diff options
| author | Allan Haldane <ealloc@gmail.com> | 2017-09-18 03:01:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-18 03:01:30 +0200 |
| commit | 8927415381c00ac5bf7aea5f473ce64a694170d8 (patch) | |
| tree | c82e6515212d04e46de956d0a2cc3a3c2b285274 /numpy/ma/core.py | |
| parent | 925cb5f34b2d246dde9f48257edba9a1c4a3d5ff (diff) | |
| parent | 9aea5a42bd8b74ffd2472d1e6c7761daca868a4a (diff) | |
| download | numpy-8927415381c00ac5bf7aea5f473ce64a694170d8.tar.gz | |
Merge pull request #9433 from eric-wieser/transpose-full-view
BUG: make np.transpose return a view of the mask
Diffstat (limited to 'numpy/ma/core.py')
| -rw-r--r-- | numpy/ma/core.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 78e7b27a7..d8d3ae621 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -2563,7 +2563,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: |
