summaryrefslogtreecommitdiff
path: root/numpy/ma/tests
diff options
context:
space:
mode:
authorpierregm <pierregm@localhost>2009-10-09 02:17:30 +0000
committerpierregm <pierregm@localhost>2009-10-09 02:17:30 +0000
commit8cad335f8b97100df988dbb6fd5d06072c667515 (patch)
tree5eb53d599da9028fc42d31ffdd979f022268a472 /numpy/ma/tests
parente54df63621db89eddbadc7bf0f36798ee1f79e0a (diff)
downloadnumpy-8cad335f8b97100df988dbb6fd5d06072c667515.tar.gz
* ma.masked_equal : force the `fill_value` of the output to `value` (ticket #1253)
* lib._iotools: - NameValidator : add the `nbfields` optional argument to validate - add easy_dtype * lib.io.genfromtxt : - add the `autostrip` optional argument (ticket #1238) - use `invalid_raise=True` as default - use the easy_dtype mechanism (ticket #1252)
Diffstat (limited to 'numpy/ma/tests')
-rw-r--r--numpy/ma/tests/test_core.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
index 61f315753..e3447b546 100644
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -2591,6 +2591,12 @@ class TestMaskedArrayFunctions(TestCase):
assert_equal(mx, x)
assert_equal(mx._mask, [1,1,0])
+ def test_masked_equal_fill_value(self):
+ x = [1, 2, 3]
+ mx = masked_equal(x, 3)
+ assert_equal(mx._mask, [0, 0, 1])
+ assert_equal(mx.fill_value, 3)
+
def test_masked_where_condition(self):
"Tests masking functions."
x = array([1.,2.,3.,4.,5.])