summaryrefslogtreecommitdiff
path: root/numpy/ma/core.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2014-04-11 20:13:46 -0600
committerCharles Harris <charlesr.harris@gmail.com>2014-04-11 20:13:46 -0600
commit61c699e5e1bf8b4b85ffd72a99691138d5674b50 (patch)
tree575e3c84b278f7b06d3589ed450d3f0cb6831464 /numpy/ma/core.py
parentfbf2072039f948ec1753d45d46d26b92cfacb1ef (diff)
parentd69cd857d8caa3477faf05152f3be634b51175f8 (diff)
downloadnumpy-61c699e5e1bf8b4b85ffd72a99691138d5674b50.tar.gz
Merge pull request #4615 from mhvk/ma/matrix-flat-redo-shape
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)