Returns array of indices of the maximum values along the given axis. Masked values are treated as if they had the value fill_value. Parameters ---------- axis : {None, integer} If None, the index is into the flattened array, otherwise along
(self, axis=None, fill_value=None, out=None, *,
keepdims=np._NoValue)
| 5636 | return d.argmin(axis, out=out, keepdims=keepdims) |
| 5637 | |
| 5638 | def argmax(self, axis=None, fill_value=None, out=None, *, |
| 5639 | keepdims=np._NoValue): |
| 5640 | """ |
| 5641 | Returns array of indices of the maximum values along the given axis. |
| 5642 | Masked values are treated as if they had the value fill_value. |
| 5643 | |
| 5644 | Parameters |
| 5645 | ---------- |
| 5646 | axis : {None, integer} |
| 5647 | If None, the index is into the flattened array, otherwise along |
| 5648 | the specified axis |
| 5649 | fill_value : scalar or None, optional |
| 5650 | Value used to fill in the masked values. If None, the output of |
| 5651 | maximum_fill_value(self._data) is used instead. |
| 5652 | out : {None, array}, optional |
| 5653 | Array into which the result can be placed. Its type is preserved |
| 5654 | and it must be of the right shape to hold the output. |
| 5655 | |
| 5656 | Returns |
| 5657 | ------- |
| 5658 | index_array : {integer_array} |
| 5659 | |
| 5660 | Examples |
| 5661 | -------- |
| 5662 | >>> a = np.arange(6).reshape(2,3) |
| 5663 | >>> a.argmax() |
| 5664 | 5 |
| 5665 | >>> a.argmax(0) |
| 5666 | array([1, 1, 1]) |
| 5667 | >>> a.argmax(1) |
| 5668 | array([2, 2]) |
| 5669 | |
| 5670 | """ |
| 5671 | if fill_value is None: |
| 5672 | fill_value = maximum_fill_value(self._data) |
| 5673 | d = self.filled(fill_value).view(ndarray) |
| 5674 | keepdims = False if keepdims is np._NoValue else bool(keepdims) |
| 5675 | return d.argmax(axis, out=out, keepdims=keepdims) |
| 5676 | |
| 5677 | def sort(self, axis=-1, kind=None, order=None, |
| 5678 | endwith=True, fill_value=None): |