dpnp.argmax
- dpnp.argmax(x1, axis=None, out=None)[source]
Returns the indices of the maximum values along an axis.
For full documentation refer to
numpy.argmax.Limitations
Input array is supported as
dpnp.ndarray. Otherwise the function will be executed sequentially on CPU. Parameteraxisis supported only with default valueNone. Parameteroutis supported only with default valueNone. Input array data types are limited by supported DPNP Data types.See also
dpnp.argminReturns the indices of the minimum values along an axis.
dpnp.amaxThe maximum value along a given axis.
dpnp.unravel_indexConvert a flat index into an index tuple.
dpnp.take_along_axisApply
np.expand_dims(index_array, axis)from argmax to an array as if by calling max.
Notes
In case of multiple occurrences of the maximum values, the indices corresponding to the first occurrence are returned.
Examples
>>> import dpnp as np >>> a = np.arange(6).reshape((2, 3)) + 10 >>> a.shape (2, 3) >>> [i for i in a] [10, 11, 12, 13, 14, 15] >>> np.argmax(a) 5