colour.utilities.centroid

colour.utilities.centroid(a)[source]

Computes the centroid indexes of given \(a\) array.

Parameters

a (array_like) – \(a\) array to compute the centroid indexes.

Returns

\(a\) array centroid indexes.

Return type

ndarray

Examples

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