colour.algebra.normalise_maximum#

colour.algebra.normalise_maximum(a: ArrayLike, axis: int | None = None, factor: float = 1, clip: bool = True) NDArrayFloat[source]#

Normalise given array \(a\) values by \(a\) maximum value and optionally clip them between.

Parameters:
  • a (ArrayLike) – Array \(a\) to normalise.

  • axis (int | None) – Normalization axis.

  • factor (float) – Normalization factor.

  • clip (bool) – Clip values to domain [0, ‘factor’].

Returns:

Maximum normalised array \(a\).

Return type:

numpy.ndarray

Examples

>>> a = np.array([0.48222001, 0.31654775, 0.22070353])
>>> normalise_maximum(a)  
array([ 1.        ,  0.6564384...,  0.4576822...])