diff options
author | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2014-04-11 21:11:16 -0400 |
---|---|---|
committer | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2014-04-11 21:52:21 -0400 |
commit | d69cd857d8caa3477faf05152f3be634b51175f8 (patch) | |
tree | 3ff583c5471b72b924200040ae73b542f7e854f9 /numpy/ma/core.py | |
parent | f9e0771632428e7594ad3106019cc6cb96498b64 (diff) | |
download | numpy-d69cd857d8caa3477faf05152f3be634b51175f8.tar.gz |
Revert line from #4585 to get mask, data shapes to match in .flat
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r-- | numpy/ma/core.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 3e12d22e4..fe3c03789 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -2534,6 +2534,8 @@ class MaskedIterator(object): if self.maskiter is not None: _mask = self.maskiter.__getitem__(indx) if isinstance(_mask, ndarray): + # set shape to match that of data; this is needed for matrices + _mask.shape = result.shape result._mask = _mask elif isinstance(_mask, np.void): return mvoid(result, mask=_mask, hardmask=self.ma._hardmask) |