diff options
author | sasha <sasha@localhost> | 2006-01-08 07:07:40 +0000 |
---|---|---|
committer | sasha <sasha@localhost> | 2006-01-08 07:07:40 +0000 |
commit | 4596572c65c77590fff709a85a3992254cc145d3 (patch) | |
tree | c848503d6fbd30e4f1fe497f3e1365dc56497e06 /numpy/core | |
parent | 9974432933d79aa0ec94344a56e280bd015b7652 (diff) | |
download | numpy-4596572c65c77590fff709a85a3992254cc145d3.tar.gz |
Fixed the case when scalar mask is not None but False (see r1850)
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/ma.py | 4 | ||||
-rw-r--r-- | numpy/core/tests/test_ma.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/numpy/core/ma.py b/numpy/core/ma.py index 74594f97c..b4467bf73 100644 --- a/numpy/core/ma.py +++ b/numpy/core/ma.py @@ -1228,8 +1228,10 @@ array(data = %(data)s, #ok, if scalar if d.shape: raise - else: + elif m: result = numeric.array(value, dtype=d.dtype) + else: + result = d return result def ids (self): diff --git a/numpy/core/tests/test_ma.py b/numpy/core/tests/test_ma.py index 6f5612934..1fb706f7b 100644 --- a/numpy/core/tests/test_ma.py +++ b/numpy/core/tests/test_ma.py @@ -603,7 +603,9 @@ class test_ma(ScipyTestCase): self.failUnless(maximum(xm, xm).mask) self.failUnless(minimum(xm, xm).mask) self.failUnless(xm.filled().dtype is xm.data.dtype) - + x = array(0, mask=0) + self.failUnless(x.filled() is x.data) + def timingTest(): for f in [testf, testinplace]: for n in [1000,10000,50000]: |