diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2020-04-16 22:45:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 22:45:49 -0500 |
commit | e51992aa22f9868ac4ab09608c5ba98cc93fb590 (patch) | |
tree | 2ac320b1f573b01040eac84d3c2235d6c959a09d /numpy | |
parent | 0b516d28e606d97266a95234a8deea268ecc3ec8 (diff) | |
parent | 050181e8d660d981d8f4a6b870d1859bf617a414 (diff) | |
download | numpy-e51992aa22f9868ac4ab09608c5ba98cc93fb590.tar.gz |
Merge pull request #15993 from vrakesh/masked_array_sort_doc
DOC: Fix method documentation of function sort in MaskedArray
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/ma/core.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index fa888107f..00e6bbd98 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -6824,7 +6824,18 @@ def argsort(a, axis=np._NoValue, kind=None, order=None, endwith=True, fill_value argsort.__doc__ = MaskedArray.argsort.__doc__ def sort(a, axis=-1, kind=None, order=None, endwith=True, fill_value=None): - "Function version of the eponymous method." + """ + Return a sorted copy of the masked array. + + Equivalent to creating a copy of the array + and applying the MaskedArray ``sort()`` method. + + Refer to ``MaskedArray.sort`` for the full documentation + + See Also + -------- + MaskedArray.sort : equivalent method + """ a = np.array(a, copy=True, subok=True) if axis is None: a = a.flatten() @@ -6836,7 +6847,6 @@ def sort(a, axis=-1, kind=None, order=None, endwith=True, fill_value=None): else: a.sort(axis=axis, kind=kind, order=order) return a -sort.__doc__ = MaskedArray.sort.__doc__ def compressed(x): |