diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 1f5885516c45..fbf555323222 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -2820,6 +2820,18 @@ def amax(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue, -------- max : alias of this function ndarray.max : equivalent method + + Examples + -------- + >>> np.amax([4]) + 4 + >>> np.amax([4, -1, 67, 89]) + 89 + >>> np.amax([[1, 2, 3, 46, 44], [2, 3, 4, 55, 5]], axis=0) + array([2, 3, 4, 55, 44]) + >>> np.amax([[1, 2, 3, 46, 44], [2, 3, 4, 55, 5]], axis=1) + array([46, 55]) + """ return _wrapreduction(a, np.maximum, 'max', axis, None, out, keepdims=keepdims, initial=initial, where=where)