summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorvrakesh <rakesh.nvasudev@gmail.com>2020-04-10 20:10:02 -0700
committervrakesh <rakesh.nvasudev@gmail.com>2020-04-16 18:39:56 -0700
commit050181e8d660d981d8f4a6b870d1859bf617a414 (patch)
tree296e4ed1d7ab30547b0efb3d53e7bfc9192eaf9e /numpy
parent52c9e6f2e3e72081576fc7f629fe3eb0c67b143b (diff)
downloadnumpy-050181e8d660d981d8f4a6b870d1859bf617a414.tar.gz
DOC:Fix method documentation of function sort()
Diffstat (limited to 'numpy')
-rw-r--r--numpy/ma/core.py14
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):