colour.algebra.normalise_maximum

colour.algebra.normalise_maximum(a, axis=None, factor=1, clip=True)[source]

Normalises given array_like \(a\) variable values by \(a\) variable maximum value and optionally clip them between.

Parameters
  • a (array_like) – \(a\) variable to normalise.

  • axis (numeric, optional) – Normalization axis.

  • factor (numeric, optional) – Normalization factor.

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

Returns

Maximum normalised \(a\) variable.

Return type

ndarray

Examples

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