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