colour.utilities.centroid#

colour.utilities.centroid(a: ArrayLike) NDArrayInt[source]#

Return the centroid indexes of the specified array \(a\).

Parameters:

a (ArrayLike) – Array \(a\) to return the centroid indexes of.

Returns:

Centroid indexes of array \(a\).

Return type:

numpy.ndarray

Examples

>>> a = np.tile(np.arange(0, 5), (5, 1))
>>> centroid(a)
array([2, 3]...)