()
| 4258 | |
| 4259 | |
| 4260 | def test_setitem_masked(): |
| 4261 | # Test np.ma.masked assignment to object-type arrays |
| 4262 | x = np.ma.array(["a", 1, 3.14], dtype=object) |
| 4263 | dx = da.from_array(x.copy(), chunks=2) |
| 4264 | |
| 4265 | x[...] = np.ma.masked |
| 4266 | dx[...] = np.ma.masked |
| 4267 | |
| 4268 | assert_eq(x.mask, da.ma.getmaskarray(dx)) |
| 4269 | |
| 4270 | |
| 4271 | def test_setitem_hardmask(): |