From 1260b5293f8efacaa902fe33d6dc82d3ddc638bb Mon Sep 17 00:00:00 2001 From: Muhammad Jarir Kanji <52061313+mjkanji@users.noreply.github.com> Date: Sat, 1 Oct 2022 05:49:54 +0500 Subject: DOC: Update amin/amax return description. (#22362) Update return description to account for case when axis is a tuple of integers, noting the shape of the returned array. --- numpy/core/fromnumeric.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'numpy/core/fromnumeric.py') diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index f4c7af88a..89d731e32 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -2750,8 +2750,9 @@ def amax(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue, ------- amax : ndarray or scalar Maximum of `a`. If `axis` is None, the result is a scalar value. - If `axis` is given, the result is an array of dimension - ``a.ndim - 1``. + If `axis` is an int, the result is an array of dimension + ``a.ndim - 1``. If `axis` is a tuple, the result is an array of + dimension ``a.ndim - len(axis)``. See Also -------- @@ -2875,8 +2876,9 @@ def amin(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue, ------- amin : ndarray or scalar Minimum of `a`. If `axis` is None, the result is a scalar value. - If `axis` is given, the result is an array of dimension - ``a.ndim - 1``. + If `axis` is an int, the result is an array of dimension + ``a.ndim - 1``. If `axis` is a tuple, the result is an array of + dimension ``a.ndim - len(axis)``. See Also -------- -- cgit v1.2.1