bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / ma / core / argmin
function
numpy.ma.core:argmin
source: build-install/usr/lib/python3.14/site-packages/numpy/ma/core.py :7063
Summary
Return array of indices to the minimum values along the given axis.
Parameters
axis: {None, integer}If None, the index is into the flattened array, otherwise along the specified axis
fill_value: scalar or None, optionalValue used to fill in the masked values. If None, the output of minimum_fill_value(self._data) is used instead.
out: {None, array}, optionalArray into which the result can be placed. Its type is preserved and it must be of the right shape to hold the output.
Returns
: ndarray or scalarIf multi-dimension input, returns a new ndarray of indices to the minimum values along the given axis. Otherwise, returns a scalar of index to the minimum values along the given axis.
Examples
import numpy as np x = np.ma.array(np.arange(4), mask=[1,1,0,0]) x.shape = (2,2) x x.argmin(axis=0, fill_value=-1) x.argmin(axis=0, fill_value=9)
Aliases
-
numpy.ma.argmin