summaryrefslogtreecommitdiff
path: root/numpy/ma/core.py
diff options
context:
space:
mode:
authorpierregm <pierregm@localhost>2008-07-22 20:52:48 +0000
committerpierregm <pierregm@localhost>2008-07-22 20:52:48 +0000
commit6dd88dc3b6c94d54585f639c533c00bf0928e13a (patch)
tree96e92e2ef990e84725818c0ff918b9961773396b /numpy/ma/core.py
parente9ae63eda3f9ac5076ba2d216c96e6e137270009 (diff)
downloadnumpy-6dd88dc3b6c94d54585f639c533c00bf0928e13a.tar.gz
* force the domain to the shape of the other element in DomainedBinaryOperation (bugfix 857)
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r--numpy/ma/core.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index b02b175d0..2236c3846 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -639,7 +639,10 @@ class _DomainedBinaryOperation:
if t.any(None):
mb = mask_or(mb, t)
# The following line controls the domain filling
- d2 = np.where(t,self.filly,d2)
+ if t.size == d2.size:
+ d2 = np.where(t,self.filly,d2)
+ else:
+ d2 = np.where(np.resize(t, d2.shape),self.filly, d2)
m = mask_or(ma, mb)
if (not m.ndim) and m:
return masked