colour.utilities.xp_interp#

colour.utilities.xp_interp(x: ArrayLike, x_data: ArrayLike, fp: ArrayLike, *, xp: ProtocolArrayNamespace | ModuleType | None = None) NDArrayFloat[source]#

Array API compatible implementation of numpy.interp().

Parameters:
  • x (ArrayLike) – x-coordinates at which to evaluate the interpolation.

  • x_data (ArrayLike) – x-coordinates of the data points.

  • fp (ArrayLike) – y-coordinates of the data points.

  • xp (ProtocolArrayNamespace | ModuleType | None) – Array namespace module. If None, derived from x, x_data and fp.

Returns:

Interpolated values.

Return type:

object