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

unit-aware versions of unsupported functions #70

Closed
8 tasks done
Tracked by #80
keewis opened this issue Feb 26, 2021 · 3 comments · Fixed by #84
Closed
8 tasks done
Tracked by #80

unit-aware versions of unsupported functions #70

keewis opened this issue Feb 26, 2021 · 3 comments · Fixed by #84

Comments

@keewis
Copy link
Collaborator

keewis commented Feb 26, 2021

See also #6.

Due to a variety of reasons, some functions don't support units (partially or not at all). Since that seems unlikely to change in the near future, we can provide wrapper functions that handle the units before passing them to the appropriate xarray function.

I'm currently planning to add these:

This was referenced Mar 2, 2021
@keewis
Copy link
Collaborator Author

keewis commented Mar 3, 2021

I will hold off on interpolate_na because it might be possible to replace the call to numpy.vectorize by broadcasting correctly (which, considering that vectorize is essentially a python loop, might also be faster).

This was referenced Mar 4, 2021
@keewis
Copy link
Collaborator Author

keewis commented Mar 11, 2021

after discussion it seems that supporting interpolate_na is difficult right now: numpy.interp does not support the axis kwarg (which is the reason for vectorize) and scipy does not support duckarrays. I guess we'll need a wrapper function for it.

@keewis
Copy link
Collaborator Author

keewis commented Mar 11, 2021

as for chunk: is chunking after quantify something we should support? rechunk does work properly, but da.from_array will use pint.Quantity as meta.

This was referenced Mar 15, 2021
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.

1 participant