Skip to content

Conversation

@ianthomas23
Copy link
Contributor

Fixes #598.

Bug is caused by code like

max_data = da.nanmax(data[da.isfinite(data)])

as lazy evaluation of data[da.isfinite(data)] has an unknown shape.

The exception that is raised points to a possible solution which is to use compute_chunk_sizes() to determine the shape. However, this would be a dask-specific solution.

The solution here keeps the shape of the modified data array the same as it was. The same improvement could be applied to the numpy and cupy implementations, but I have left them for a future PR.

@ianthomas23 ianthomas23 merged commit 880e38d into xarray-contrib:master Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_classify failure with dask-2021.12.0

1 participant