numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ParametersReturns
argmax(self, axis=None, fill_value=None, out=None, *, keepdims=<no value>)

Parameters

axis : {None, integer}

If None, the index is into the flattened array, otherwise along the specified axis

fill_value : scalar or None, optional

Value used to fill in the masked values. If None, the output of maximum_fill_value(self._data) is used instead.

out : {None, array}, optional

Array into which the result can be placed. Its type is preserved and it must be of the right shape to hold the output.

Returns

index_array : {integer_array}

Returns array of indices of the maximum values along the given axis. Masked values are treated as if they had the value fill_value.

Examples

This example is valid syntax, but we were not able to check execution
>>> a = np.arange(6).reshape(2,3)
... a.argmax() 5
This example is valid syntax, but we were not able to check execution
>>> a.argmax(0)
array([1, 1, 1])
This example is valid syntax, but we were not able to check execution
>>> a.argmax(1)
array([2, 2])
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/ma/core.py#5541
type: <class 'function'>
Commit: