Skip to content
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

Warning in derived fields example #115

Closed
kyleaoman opened this issue Dec 11, 2023 · 2 comments · Fixed by #122
Closed

Warning in derived fields example #115

kyleaoman opened this issue Dec 11, 2023 · 2 comments · Fixed by #122

Comments

@kyleaoman
Copy link

I get the following warning when running the examples in the 'derived fields' section of the docs:

>>> ds['stars']['VelMag']
/home/txwx36/.venv/scida/lib64/python3.11/site-packages/dask/array/core.py:3469: UserWarning: Passing an object to dask.array.from_array which is already a Dask collection. This can lead to unexpected behavior.
@cbyrohl
Copy link
Owner

cbyrohl commented Dec 12, 2023

This issue is related to pint. For xarray they discussed the same issue of pint interplay with dask: xarray-contrib/pint-xarray#116 and pydata/xarray#5559. Short-term, I will add this warning to the FAQ and/or suppress error. Long-term, need to check how xarray fixed this in this PR: pydata/xarray#5571

@cbyrohl cbyrohl mentioned this issue Dec 12, 2023
cbyrohl added a commit that referenced this issue Jan 2, 2024
@cbyrohl
Copy link
Owner

cbyrohl commented Jan 2, 2024

I adjusted the example to not produce this warning in #122

cbyrohl added a commit that referenced this issue Jan 2, 2024
* fix #115 by adjusting example + add pint-dask user warning to faq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants