colour.utilities.centroid#
- colour.utilities.centroid(a: ArrayLike) numpy.ndarray[Any, numpy.dtype[numpy._typing._array_like._ScalarType_co]] [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
Examples
>>> a = np.tile(np.arange(0, 5), (5, 1)) >>> centroid(a) array([2, 3]...)