Skip to content

Commit

Permalink
Add test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl committed Jan 3, 2025
1 parent af36299 commit c67a2c9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dask/array/tests/test_slicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,3 +1120,14 @@ def test_vindex_with_dask_array():
indexer = np.random.randint(0, 3, 8).reshape(4, 2).astype(int)
dindexer = da.from_array(indexer, chunks=(2, 2))
assert_eq(darr.vindex[dindexer], arr[indexer])

msg = "vindex does not support indexing"

with pytest.raises(IndexError, match=msg):
darr.rechunk((1, 1)).vindex[dindexer]

with pytest.raises(IndexError, match=msg):
darr.reshape((3, 1)).vindex[dindexer]

with pytest.raises(IndexError, match=msg):
darr.vindex[(dindexer, None)]

0 comments on commit c67a2c9

Please sign in to comment.