Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map_blocks doesn't work when dask isn't installed #3391

Closed
crusaderky opened this issue Oct 10, 2019 · 1 comment · Fixed by #5731
Closed

map_blocks doesn't work when dask isn't installed #3391

crusaderky opened this issue Oct 10, 2019 · 1 comment · Fixed by #5731

Comments

@crusaderky
Copy link
Contributor

Iterative improvement on #3276 @dcherian

map_blocks crashes with ImportError if dask isn't installed, even if it's legal to run it on a DataArray/Dataset without any dask variables.
This forces writers of extension libraries to either not use map_blocks, add dask as a strict requirement, or write a switch in their own code.

Please change the code so that it works without dask (you'll need to write a stub of dask.is_dask_collection that always returns False) and add relevant tests to be triggered in our py36-bare-minimum CI environment.

@shoyer
Copy link
Member

shoyer commented Oct 12, 2019

I agree, this would be a nice feature to support. I do not think it should block issuing a release.

Gijom added a commit to Gijom/xarray that referenced this issue Aug 23, 2021
Calls to dask functions are replaced by calls to the
pycompat functions
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 a pull request may close this issue.

2 participants