summaryrefslogtreecommitdiff
path: root/numpy/ma/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r--numpy/ma/core.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 68c5d5595..8dc2ca86e 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -6186,10 +6186,10 @@ def compressed(x):
Equivalent method.
"""
- if getmask(x) is nomask:
- return np.asanyarray(x)
- else:
- return x.compressed()
+ if not isinstance(x, MaskedArray):
+ x = asanyarray(x)
+ return x.compressed()
+
def concatenate(arrays, axis=0):
"""