()
| 4269 | |
| 4270 | |
| 4271 | def test_setitem_hardmask(): |
| 4272 | x = np.ma.array([1, 2, 3, 4], dtype=int) |
| 4273 | x.harden_mask() |
| 4274 | |
| 4275 | y = x.copy() |
| 4276 | assert y.hardmask |
| 4277 | |
| 4278 | x[0] = np.ma.masked |
| 4279 | x[0:2] = np.ma.masked |
| 4280 | |
| 4281 | dx = da.from_array(y) |
| 4282 | dx[0] = np.ma.masked |
| 4283 | dx[0:2] = np.ma.masked |
| 4284 | assert_eq(x, dx) |
| 4285 | |
| 4286 | |
| 4287 | def test_setitem_slice_twice(): |