-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Remove the need for uncertainties.unumpy for NumPy arrays #47
Comments
Interesting. Do you have a pointer to the NumPy documentation for this? This would remove the need for umath altogether. PS: The correct monkey patch is actually |
See NumPy issue 7519. This is actually an undesirable side affect of the current implementation of ufuncs. Apparently the new There is more info re: Perhaps I should change the title of this issue to, "reimplement Do you think there is any interest in a pull request for overloading ndarray ufuncs using |
Reference: as of NumPy 1.13, a nicer universal function overriding mechanism is available (which is I guess consistent with the Mechanism for Overriding UFuncs?): https://github.com/numpy/numpy/releases/tag/v1.13.0rc1. |
PS: See:
|
Hi @lebigot, I'm super sorry, but it's not likely I'll get to work on this, so if you choose to close it, I'll understand. Thanks |
No need to be sorry: we can all only do our best. :) I started investigating this. There might be a simple solution. |
https://numpy.org/neps/nep-0018-array-function-protocol.html might be relevant. |
If you re-implement this using the new xarray currently wraps either numpy arrays or dask arrays (for distributed computation), but we are in the process of generalising this to wrap any array which implements the It should even be possible once this is implemented to wrap arrays in a nested fashion, so you could have a unit-aware, uncertainty-propagating, distributed array, wrapped in xarray's high-level objects 😮 |
if I monkeypatch
Variable
I can use my existing code without modifications:although unfortunately it doesn't save anytime over using the looped methods already in
unumpy
.The text was updated successfully, but these errors were encountered: