colour.utilities.centroid#

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

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

Parameters

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

Returns

Array \(a\) centroid indexes.

Return type

numpy.ndarray

Examples

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