()
| 4243 | |
| 4244 | |
| 4245 | def test_setitem_1d(): |
| 4246 | x = np.arange(10) |
| 4247 | dx = da.from_array(x.copy(), chunks=(5,)) |
| 4248 | |
| 4249 | x[x > 6] = -1 |
| 4250 | x[x % 2 == 0] = -2 |
| 4251 | x[[2, 3]] = -3 |
| 4252 | |
| 4253 | dx[dx > 6] = -1 |
| 4254 | dx[dx % 2 == 0] = -2 |
| 4255 | dx[da.asarray([2, 3])] = -3 |
| 4256 | |
| 4257 | assert_eq(x, dx) |
| 4258 | |
| 4259 | |
| 4260 | def test_setitem_masked(): |