nums.numpy.argmin
-
nums.numpy.
argmin
(a, axis=None, out=None)[source] Returns the indices of the minimum values along an axis.
This docstring was copied from numpy.argmin.
Some inconsistencies with the NumS version may exist.
- Parameters
a (BlockArray) – Input array.
axis (int, optional) – By default, the index is into the flattened array, otherwise along the specified axis.
out (array, optional) – If provided, the result will be inserted into this array. It should be of the appropriate shape and dtype.
- Returns
index_array – Array of indices into the array. It has the same shape as a.shape with the dimension along axis removed.
- Return type
BlockArray of ints
Notes
In case of multiple occurrences of the minimum values, the indices corresponding to the first occurrence are returned.
‘out’ is currently not supported.
Examples
The doctests shown below are copied from NumPy. They won’t show the correct result until you operate
get()
.>>> b = nps.arange(6) + 10 >>> b[4] = 10 >>> b.get() array([10, 11, 12, 13, 10, 15]) >>> nps.argmin(b).get() # Only the first occurrence is returned. array(0)