summaryrefslogtreecommitdiff
path: root/numpy/ma/core.py
diff options
context:
space:
mode:
authorMarten van Kerkwijk <mhvk@astro.utoronto.ca>2014-04-11 21:11:16 -0400
committerMarten van Kerkwijk <mhvk@astro.utoronto.ca>2014-04-11 21:52:21 -0400
commitd69cd857d8caa3477faf05152f3be634b51175f8 (patch)
tree3ff583c5471b72b924200040ae73b542f7e854f9 /numpy/ma/core.py
parentf9e0771632428e7594ad3106019cc6cb96498b64 (diff)
downloadnumpy-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.py2
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)