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. Parameter axis is supported only with default value None. Parameter out is supported only with default value None. Input array data types are limited by supported DPNP Data types.

See also

dpnp.argmin

Returns the indices of the minimum values along an axis.

dpnp.amax

The maximum value along a given axis.

dpnp.unravel_index

Convert a flat index into an index tuple.

dpnp.take_along_axis

Apply 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