colour.lagrange_coefficients

colour.lagrange_coefficients(r: float, n: int = 4) numpy.ndarray[source]

Compute the Lagrange Coefficients at given point \(r\) for degree \(n\).

Parameters
  • r (float) – Point to get the Lagrange Coefficients at.

  • n (int) – Degree of the Lagrange Coefficients being calculated.

Return type

numpy.ndarray

References

[Fai85], [Wikipedia03b]

Examples

>>> lagrange_coefficients(0.1)
array([ 0.8265,  0.2755, -0.1305,  0.0285])