colour.kernel_nearest_neighbour#

colour.kernel_nearest_neighbour(x: ArrayLike) NDArrayFloat[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:

numpy.ndarray

References

[BB09]

Examples

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