(self)
| 2074 | [False, True]]) |
| 2075 | |
| 2076 | def test_numpyarithmetic(self): |
| 2077 | # Check that the mask is not back-propagated when using numpy functions |
| 2078 | a = masked_array([-1, 0, 1, 2, 3], mask=[0, 0, 0, 0, 1]) |
| 2079 | control = masked_array([np.nan, np.nan, 0, np.log(2), -1], |
| 2080 | mask=[1, 1, 0, 0, 1]) |
| 2081 | |
| 2082 | test = log(a) |
| 2083 | assert_equal(test, control) |
| 2084 | assert_equal(test.mask, control.mask) |
| 2085 | assert_equal(a.mask, [0, 0, 0, 0, 1]) |
| 2086 | |
| 2087 | test = np.log(a) |
| 2088 | assert_equal(test, control) |
| 2089 | assert_equal(test.mask, control.mask) |
| 2090 | assert_equal(a.mask, [0, 0, 0, 0, 1]) |
| 2091 | |
| 2092 | |
| 2093 | class TestMaskedArrayAttributes: |
nothing calls this directly
no test coverage detected