# 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. The nearest-neighbour kernel evaluated at given samples. ndarray

References

[BB09]

Examples

>>> kernel_nearest_neighbour(np.linspace(0, 1, 10))
array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0])