diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-04-03 12:54:35 -0400 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-04-03 12:54:35 -0400 |
commit | 147c60f83f401037ff29593826d2c5729a73c2c5 (patch) | |
tree | e93661497c4858a4e22c6b9de2df1d5af03dce2a /numpy/core/fromnumeric.py | |
parent | 8b6effadd7836f7e80f0f3e7dd9dd43d20ad1590 (diff) | |
parent | 8d47d697dad06116abe2b40ad6ee78f867292209 (diff) | |
download | numpy-147c60f83f401037ff29593826d2c5729a73c2c5.tar.gz |
Merge pull request #5733 from ahaldane/keepdim_doc
ENH sync ndarray methods doc/args with numpy function doc/args
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index b0c141178..549647df2 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -900,7 +900,7 @@ def argsort(a, axis=-1, kind='quicksort', order=None): return argsort(axis, kind, order) -def argmax(a, axis=None): +def argmax(a, axis=None, out=None): """ Returns the indices of the maximum values along an axis. @@ -911,6 +911,9 @@ def argmax(a, axis=None): 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 ------- @@ -953,11 +956,11 @@ def argmax(a, axis=None): try: argmax = a.argmax except AttributeError: - return _wrapit(a, 'argmax', axis) - return argmax(axis) + return _wrapit(a, 'argmax', axis, out) + return argmax(axis, out) -def argmin(a, axis=None): +def argmin(a, axis=None, out=None): """ Returns the indices of the minimum values along an axis. @@ -968,6 +971,9 @@ def argmin(a, axis=None): 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 ------- @@ -1010,8 +1016,8 @@ def argmin(a, axis=None): try: argmin = a.argmin except AttributeError: - return _wrapit(a, 'argmin', axis) - return argmin(axis) + return _wrapit(a, 'argmin', axis, out) + return argmin(axis, out) def searchsorted(a, v, side='left', sorter=None): |