summaryrefslogtreecommitdiff
path: root/numpy/ma/extras.py
diff options
context:
space:
mode:
authorLev Abalkin <abalkin@enlnt.com>2013-11-14 15:24:23 -0500
committerLev Abalkin <abalkin@enlnt.com>2013-11-14 15:24:23 -0500
commita49c2797c84825e397de1a5dea4daf0b6db3f160 (patch)
tree5a97895389e55ad640256976749b7d5be08940cd /numpy/ma/extras.py
parentd8fd28389adb491e24b7cdc25cd1b20f539310c3 (diff)
downloadnumpy-a49c2797c84825e397de1a5dea4daf0b6db3f160.tar.gz
BUG: Fixed mask_rowcols().
Previous implementation relied on ma.asarray() to always create a new object. See gh-4043.
Diffstat (limited to 'numpy/ma/extras.py')
-rw-r--r--numpy/ma/extras.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py
index d14812093..965a43703 100644
--- a/numpy/ma/extras.py
+++ b/numpy/ma/extras.py
@@ -842,9 +842,9 @@ def mask_rowcols(a, axis=None):
fill_value=999999)
"""
- a = asarray(a)
+ a = array(a, subok=False)
if a.ndim != 2:
- raise NotImplementedError("compress2d works for 2D arrays only.")
+ raise NotImplementedError("mask_rowcols works for 2D arrays only.")
m = getmask(a)
# Nothing is masked: return a
if m is nomask or not m.any():