-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
It might be useful to provide an API to select Dask arrays by block. This would be useful for operations like selecting all internal blocks, selecting every other block, etc.. Presumably this would use numpy-like slicing on an attribute and return a dask array back:
>>> x = da.arange(20, chunks=(5,))
>>> x.blocks[:2]
dask.array<getitem, shape=(10,), dtype=int64, chunksize=(5,)>
>>> x.blocks[:2]
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> x.blocks[::2].compute()
array([0, 1, 2, 3, 4, 10, 11, 12, 13, 14])I think that this was previously mentioned by @shoyer, but I can't find the issue. cc also @jakirkham and @stuartarchibald
Reactions are currently unavailable