Closed
Description
In dask, a user can compute multiple arrays in a single scheduler run using the dask.compute
function:
>>> a_computed, b_computed = dask.compute(a, b)
This is nice for when a
and b
might share intermediates. The same can be done currently in xarray if a
and b
are first put into a dataset:
>>> both = xr.Dataset(dict(a=a, b=b))
>>> both.load() # Compute all the arrays in a single pass
This is fine, but it might also be nice to be able to do this without first putting everything into a dataset. I'm not sure what a good api is here, as xarray objects mutate when computed. Perhaps just adding an xr.compute(*args)
function that fully realizes all dask backed variables.
>>> xr.compute(a, b) # a and b now contain numpy arrays, not dask arrays
Metadata
Metadata
Assignees
Labels
No labels