colour.polynomial_expansion#

colour.polynomial_expansion(a: ArrayLike, method: Union[Literal['Cheung 2004', 'Finlayson 2015', 'Vandermonde'], str] = 'Cheung 2004', **kwargs: Any) numpy.ndarray[source]#

Perform polynomial expansion of given \(a\) array.

Parameters
Returns

Expanded \(a\) array.

Return type

numpy.ndarray

References

[CWCR04], [FMH15], [WR04], [Wikipedia03f]

Examples

>>> RGB = np.array([0.17224810, 0.09170660, 0.06416938])
>>> polynomial_expansion(RGB)  
array([ 0.1722481...,  0.0917066...,  0.0641693...])
>>> polynomial_expansion(RGB, 'Cheung 2004', terms=5)  
array([ 0.1722481...,  0.0917066...,  0.0641693...,  0.0010136...,  1...])