Uh oh!
There was an error while loading. Please reload this page.
Generalize handling of chunked array types - #7019
Conversation
for more information, see https://pre-commit.ci
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This reverts commit cdcb3fb.
for more information, see https://pre-commit.ci
…rray into cubed_integration
Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com>
for more information, see https://pre-commit.ci
…rray into cubed_integration
TomNicholas
commented
May 17, 2023
@Illviljan thanks for all your comments! Would you (or @keewis?) be willing to approve this PR now? I would really like to merge this so that I can release a version of xarray that I can use as a dependency for cubed-xarray. |
Uh oh!
There was an error while loading. Please reload this page.
dcherian
commented
May 18, 2023
Thanks @TomNicholas Big change! |
TomNicholas
commented
May 18, 2023
Woooo thanks @dcherian ! |
jhamman
commented
May 18, 2023
👏 Congrats @TomNicholas on getting this in! Such an important contribution. 👏 |
tomwhite
commented
May 19, 2023
Thanks for all your hard work on this @TomNicholas! |
Initial attempt to get cubed working within xarray, as an alternative to dask.
whats-new.rstapi.rstI've added a
managerkwarg to the.chunkmethods so you can doda.chunk(manager="cubed")to convert to a chunkedcubed.CoreArray, with the default still beingda.chunk(manager="dask"). (I couldn't think of a better name than "manager", as "backend" and "executor" are already taken.)At the moment it should work except for an import error that I don't understand, see below.Fro cubed to work at all with this PR we would also need:
Arrayvscubed.CoreArraycubed-dev/cubed#123apply_gufunc[WIP] apply_gufunc cubed-dev/cubed#119 - implemented in Addapply_gufunccubed-dev/cubed#149 🥳To-dos for me on this PR:
xarray.apply_ufuncthroughcubed.apply_gufuncinstead of dask'sapply_gufuncwhen appropriate,from_array_kwargsto opening functions, e.g.open_zarr, andopen_dataset,from_array_kwargsto creation functions, such asfull_like,store_kwargsas a way to propagate cubed-specific kwargs when savingto_zarr.To complete this project more generally we should also:
cubed.apply_gufuncsupport multiple output arguments Support multiple outputs inapply_gufunccubed-dev/cubed#152cubed.unify_chunksto matchdask.array.core.unify_chunksxarray.map_blocksto work on cubed arrays, ideally by first rewriting xarray's implementation ofmap_blocksto usedask.array.map_blockscc @tomwhite