(self)
| 1907 | [False, True]]) |
| 1908 | |
| 1909 | def test_numpyarithmetic(self): |
| 1910 | # Check that the mask is not back-propagated when using numpy functions |
| 1911 | a = masked_array([-1, 0, 1, 2, 3], mask=[0, 0, 0, 0, 1]) |
| 1912 | control = masked_array([np.nan, np.nan, 0, np.log(2), -1], |
| 1913 | mask=[1, 1, 0, 0, 1]) |
| 1914 | |
| 1915 | test = log(a) |
| 1916 | assert_equal(test, control) |
| 1917 | assert_equal(test.mask, control.mask) |
| 1918 | assert_equal(a.mask, [0, 0, 0, 0, 1]) |
| 1919 | |
| 1920 | test = np.log(a) |
| 1921 | assert_equal(test, control) |
| 1922 | assert_equal(test.mask, control.mask) |
| 1923 | assert_equal(a.mask, [0, 0, 0, 0, 1]) |
| 1924 | |
| 1925 | |
| 1926 | class TestMaskedArrayAttributes: |
nothing calls this directly
no test coverage detected