From 8cad335f8b97100df988dbb6fd5d06072c667515 Mon Sep 17 00:00:00 2001 From: pierregm Date: Fri, 9 Oct 2009 02:17:30 +0000 Subject: * 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) --- numpy/ma/tests/test_core.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'numpy/ma/tests') 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.]) -- cgit v1.2.1