Closed
Description
da = xr.DataArray([1,2,3], dims=['x'], attrs={'units': 'metres'})
chunked = da.pint.quantify().pint.chunk(1)
# chunked2 = da.chunk(1).pint.quantify() # also happens if I do it in this order instead
Everything looks fine here, excellent...
but when I go to compute then I get a UserWarning
, even though it returns the correct answer:
chunked.mean().compute()
/home/tegn500/miniconda3/envs/py38-mamba/lib/python3.8/site-packages/dask/array/core.py:3139:
UserWarning: Passing an object to dask.array.from_array which is already a Dask collection. This can lead to unexpected behavior.
warnings.warn(
Even if this is working fine then we don't want to be giving warnings to the user ideally.