colour.NearestNeighbourInterpolator#
- class colour.NearestNeighbourInterpolator(*args: Any, **kwargs: Any)[source]#
Bases:
KernelInterpolatorPerform nearest-neighbour interpolation on discrete data.
Implement a kernel-based interpolator that selects the closest known data point for each query position. This interpolator provides fast, discontinuous interpolation suitable for categorical data or when preserving exact measured values is required.
- Parameters:
dtype – Data type used for internal conversions.
padding_kwargs – Arguments to use when padding \(y\) variable values with the
np.pad()definition.window – Width of the window in samples on each side.
x – Independent \(x\) variable values corresponding with \(y\) variable.
y – Dependent and already known \(y\) variable values to interpolate.
args (Any)
kwargs (Any)
Methods