(self)
| 143 | assert_equal(rdata.num.mask, [1, 0, 0]) |
| 144 | |
| 145 | def test_set_fields_mask(self): |
| 146 | # Tests setting the mask of a field. |
| 147 | base = self.base.copy() |
| 148 | # This one has already a mask.... |
| 149 | mbase = base.view(mrecarray) |
| 150 | mbase['a'][-2] = masked |
| 151 | assert_equal(mbase.a, [1, 2, 3, 4, 5]) |
| 152 | assert_equal(mbase.a._mask, [0, 1, 0, 1, 1]) |
| 153 | # This one has not yet |
| 154 | mbase = fromarrays([np.arange(5), np.random.rand(5)], |
| 155 | dtype=[('a', int), ('b', float)]) |
| 156 | mbase['a'][-2] = masked |
| 157 | assert_equal(mbase.a, [0, 1, 2, 3, 4]) |
| 158 | assert_equal(mbase.a._mask, [0, 0, 0, 1, 0]) |
| 159 | |
| 160 | def test_set_mask(self): |
| 161 | base = self.base.copy() |
nothing calls this directly
no test coverage detected