summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorYoon, Jee Seok <wltjr1007@korea.ac.kr>2021-11-19 18:07:57 +0900
committerGitHub <noreply@github.com>2021-11-19 18:07:57 +0900
commitc86ebe0d343c5af9d210658a1be6115ce04feb6f (patch)
tree290b6d2d38785b33342dd03fd713e2046ebb1caa /numpy
parent056abda14dab7fa8daf7a1ab44144aeb2250c216 (diff)
downloadnumpy-c86ebe0d343c5af9d210658a1be6115ce04feb6f.tar.gz
DOC: Update axis parameter for np.ma.{min,max}
`np.ma.min` and `np.ma.max` accepts `tuple of ints` for `axis` parameter; the documentation should add it. Furthuer, since the only depenency for `axis` parameter is [`result = self.filled(fill_value).min`](https://github.com/numpy/numpy/blob/b235f9e701e14ed6f6f6dcba885f7986a833743f/numpy/ma/core.py#L5700), which is essentially `np.ndarray.min`, the documentation for `axis` parameter should be same as `np.ndarray.min` (i.e., add [.. versionadded:: 1.7.0](https://github.com/numpy/numpy/blob/056abda14dab7fa8daf7a1ab44144aeb2250c216/numpy/core/fromnumeric.py#L2814)). Same goes for np.ma.max.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/ma/core.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 491c2c605..12836967c 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -5666,9 +5666,12 @@ class MaskedArray(ndarray):
Parameters
----------
- axis : {None, int}, optional
+ axis : None or int or tuple of ints, optional
Axis along which to operate. By default, ``axis`` is None and the
flattened input is used.
+ .. versionadded:: 1.7.0
+ If this is a tuple of ints, the minimum is selected over multiple
+ axes, instead of a single axis or all the axes as before.
out : array_like, optional
Alternative output array in which to place the result. Must be of
the same shape and buffer length as the expected output.
@@ -5800,9 +5803,12 @@ class MaskedArray(ndarray):
Parameters
----------
- axis : {None, int}, optional
+ axis : None or int or tuple of ints, optional
Axis along which to operate. By default, ``axis`` is None and the
flattened input is used.
+ .. versionadded:: 1.7.0
+ If this is a tuple of ints, the maximum is selected over multiple
+ axes, instead of a single axis or all the axes as before.
out : array_like, optional
Alternative output array in which to place the result. Must
be of the same shape and buffer length as the expected output.