()
| 723 | |
| 724 | |
| 725 | def test_index_with_bool_dask_array(): |
| 726 | x = np.arange(36).reshape((6, 6)) |
| 727 | d = da.from_array(x, chunks=(3, 3)) |
| 728 | ind = np.asarray([True, True, False, True, False, False], dtype=bool) |
| 729 | ind = da.from_array(ind, chunks=2) |
| 730 | for index in [ind, (slice(1, 9, 2), ind), (ind, slice(2, 8, 1))]: |
| 731 | x_index = dask.compute(index)[0] |
| 732 | assert_eq(x[x_index], d[index]) |
| 733 | |
| 734 | |
| 735 | def test_index_with_bool_dask_array_2(): |