Indices of the maximum values along an axis.
Parameters: | a : array_like
axis : int, optional
|
---|---|
Returns: | index_array : ndarray, int
|
See also
Examples
>>> a = np.arange(6).reshape(2,3)
>>> np.argmax(a)
5
>>> np.argmax(a, axis=0)
array([1, 1, 1])
>>> np.argmax(a, axis=1)
array([2, 2])