-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
broadcast() broken on dask backend #978
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
Comments
Oops -- let's add a fix for this and a regression test in We should fix xarray/xarray/core/variable.py Line 146 in 584e703
This is sort of but not completely right. We use |
looking into this now |
Two-liner for the win #1022 |
Rebaselined #1023 |
The problem is actually somewhere in the constructor of DataArray.
In alignment.py:362, we have
return DataArray(data, ...)
where data is a Variable with dask backend. The returned DataArray object has a numpy backend.As a workaround, changing that line to
return DataArray(data.data, ...)
(thus passing a dask array) fixes the problem.After that however there's a new issue: whenever broadcast adds a dimension to an array, it creates it in a single chunk, as opposed to copying the chunking of the other arrays. This can easily call a host to go out of memory, and makes it harder to work with the arrays afterwards because chunks won't match.
The text was updated successfully, but these errors were encountered: