-
Is it possible to create a
It doesn't mention anything about passing a dask.array, but the following snippet of code seems to work as expected: import numpy as np
import dask
import dask.array as da
import xarray as xr
arr = da.stack([
da.from_delayed(dask.delayed(np.ones)(5),
shape=(5,),
dtype=float)
for _ in range(3)])
xr.DataArray(arr, coords={"y": list("abc"), "x": list(range(5))}) Can I assume that the aforementioned snippet of code doesn't compute the dask array to create the DataArray? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
yes, you can rely on I guess this part of the docstring has not been updated since quite a while? It is supposed to refer to |
Beta Was this translation helpful? Give feedback.
yes, you can rely on
dask
not to compute if you passdask
arrays to the constructor ofDataArray
.I guess this part of the docstring has not been updated since quite a while? It is supposed to refer to
duck array
instead ofarray_like
, since that's what we actually support.