Unknown chunk slicing - raise informative error#9285
Conversation
|
|
||
| def test_slicing_and_unknown_chunks(): | ||
| a = da.ones((10, 5), chunks=5) | ||
| a._chunks = ((np.nan, np.nan), (5,)) |
There was a problem hiding this comment.
I think @ian-r-rose suggested coming to empty chinks naturally rather than removing them like this. Something like:
| a._chunks = ((np.nan, np.nan), (5,)) | |
| a = a[a > 20] |
There was a problem hiding this comment.
I forgot to post why I didn't do this.
This example doesn't seem to result in unknown chunks, that trigger the issue we are trying to resolve.
I tried this and it had no problems. There are certain situations where we have nan in the chunks but we have ways of solving this. I'm not sure what's the right example that triggers the type of unknown chunks that causes this problem.
It seems we do this overwriting of the chinks in other places, see line 935 of this bit
dask/dask/array/tests/test_slicing.py
Lines 919 to 939 in 238b5db
There was a problem hiding this comment.
ah ok. It's certainly not a big deal if it doesn't just work. Thanks for the explanation.
|
🎉 |
pre-commit run --all-filesThank you @jsignell for all the help and suggestions to get this one unlocked : )
cc: @pavithraes @ian-r-rose