(self)
| 1143 | class TestMaskedArrayArithmetic: |
| 1144 | # Base test class for MaskedArrays. |
| 1145 | def _create_data(self): |
| 1146 | # Base data definition. |
| 1147 | x = np.array([1., 1., 1., -2., pi / 2.0, 4., 5., -10., 10., 1., 2., 3.]) |
| 1148 | y = np.array([5., 0., 3., 2., -1., -4., 0., -10., 10., 1., 0., 3.]) |
| 1149 | a10 = 10. |
| 1150 | m1 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0] |
| 1151 | m2 = [0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1] |
| 1152 | xm = masked_array(x, mask=m1) |
| 1153 | ym = masked_array(y, mask=m2) |
| 1154 | z = np.array([-.5, 0., .5, .8]) |
| 1155 | zm = masked_array(z, mask=[0, 1, 0, 0]) |
| 1156 | xf = np.where(m1, 1e+20, x) |
| 1157 | xm.set_fill_value(1e+20) |
| 1158 | return x, y, a10, m1, m2, xm, ym, z, zm, xf |
| 1159 | |
| 1160 | def test_basic_arithmetic(self): |
| 1161 | # Test of basic arithmetic. |
no outgoing calls
no test coverage detected