summaryrefslogtreecommitdiff
path: root/numpy/ma/core.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-07-18 00:42:15 +0100
committerEric Wieser <wieser.eric@gmail.com>2017-09-05 00:49:10 -0700
commit9aea5a42bd8b74ffd2472d1e6c7761daca868a4a (patch)
tree2d017f32dfce98d38014c1fa9f163c2578d1d9d4 /numpy/ma/core.py
parente1ccca947a297deb90301acc14b1e13e8dd0b816 (diff)
downloadnumpy-9aea5a42bd8b74ffd2472d1e6c7761daca868a4a.tar.gz
BUG: Make transpose and diagonal masks be views
Fixes gh-8506 and fixes gh-7483
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r--numpy/ma/core.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index deddacfdc..0035cd9f7 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -2558,7 +2558,8 @@ def _arraymethod(funcname, onmask=True):
if not onmask:
result.__setmask__(mask)
elif mask is not nomask:
- result.__setmask__(getattr(mask, funcname)(*args, **params))
+ # __setmask__ makes a copy, which we don't want
+ result._mask = getattr(mask, funcname)(*args, **params)
return result
methdoc = getattr(ndarray, funcname, None) or getattr(np, funcname, None)
if methdoc is not None: