colour.PchipInterpolator#

class colour.PchipInterpolator(x: ArrayLike, y: ArrayLike, *args: Any, **kwargs: Any)[source]#

Bases: PchipInterpolator

Interpolate a 1-D function using Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) interpolation.

PCHIP interpolation constructs a smooth curve through specified data points while preserving monotonicity between consecutive points. This method ensures that the interpolated values do not exhibit spurious oscillations, making it particularly suitable for colour science applications where physical constraints must be respected.

Attributes

Methods

Notes

  • This class is a wrapper around scipy.interpolate.PchipInterpolator class.

Parameters:
__init__(x: ArrayLike, y: ArrayLike, *args: Any, **kwargs: Any) None[source]#
Parameters:
Return type:

None

property y: NDArrayFloat#

Getter and setter for the dependent and already known \(y\) variable.

Parameters:

value – Value to set the dependent and already known \(y\) variable with.

Returns:

Dependent and already known \(y\) variable.

Return type:

numpy.ndarray