argmax#
- bsr_matrix.argmax(axis=None, out=None, *, explicit=False)[source]#
Return indices of maximum elements along an axis.
By default, implicit zero elements are taken into account. If there are several minimum values, the index of the first occurrence is returned. If explicit is set, only explicitly stored elements will be considered.
- Parameters:
- axis{-2, -1, 0, 1, None}, optional
Axis along which the argmax is computed. If None (default), index of the maximum element in the flatten data is returned.
- outNone, optional
This argument is in the signature solely for NumPy compatibility reasons. Do not pass in anything except for the default value, as this argument is not used.
- explicit{False, True} optional (default: False)
When set to True, only explicitly stored elements will be considered. If axis is not None and a row/column has no stored elements, argmax is undefined, so the index
0
is returned for that row/column.Added in version 1.15.0.
- Returns:
- indnumpy.matrix or int
Indices of maximum elements. If matrix, its size along axis is 1.