colour.kernel_nearest_neighbour¶
- colour.kernel_nearest_neighbour(x: ArrayLike) numpy.ndarray [source]¶
Return the nearest-neighbour kernel evaluated at given samples.
- Parameters
x (ArrayLike) – Samples at which to evaluate the nearest-neighbour kernel.
- Returns
The nearest-neighbour kernel evaluated at given samples.
- Return type
References
[BB09]
Examples
>>> kernel_nearest_neighbour(np.linspace(0, 1, 10)) array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0])