colour.plotting.models.colourspace_model_axis_reorder#

colour.plotting.models.colourspace_model_axis_reorder(a: ArrayLike, model: LiteralColourspaceModel | str, direction: Literal['Forward', 'Inverse'] | str = 'Forward') NDArrayFloat[source]#

Reorder the axes of the specified colourspace model array \(a\) to match the standard axes order used for volume plotting.

Parameters:
Returns:

Reordered colourspace model array \(a\).

Return type:

numpy.ndarray

Examples

>>> a = np.array([0, 1, 2])
>>> colourspace_model_axis_reorder(a, "CIE Lab")
array([ 1.,  2.,  0.])
>>> colourspace_model_axis_reorder(a, "IPT")
array([ 1.,  2.,  0.])
>>> colourspace_model_axis_reorder(a, "OSA UCS")
array([ 1.,  2.,  0.])
>>> b = np.array([1, 2, 0])
>>> colourspace_model_axis_reorder(b, "OSA UCS", "Inverse")
array([ 0.,  1.,  2.])