colour.kernel_nearest_neighbour#

colour.kernel_nearest_neighbour(x: Any) → Any[source]#

Return the nearest-neighbour kernel evaluated at specified samples.

The kernel equals 1 for \(|x| < 0.5\) and 0 elsewhere.

References

[BB09]

Examples

>>> import numpy as np
>>> kernel_nearest_neighbour(np.linspace(0, 1, 10))
array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0])
Parameters:

x (Any)

Return type:

Any