-
Notifications
You must be signed in to change notification settings - Fork 58
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
DataArray apply and Numpy array container #408
base: main
Are you sure you want to change the base?
Conversation
Would be even nicer if we could support this syntax; da2 = np.sqrt(da) I can't really figure out how this works, but somehow it calls the |
Great idea! A hacky first attempt is now checked in. Note also this medium write up about someone attempting something similar: https://towardsdatascience.com/wrapping-numpys-arrays-971e015e14bb |
This seem like the proper reference |
This PR will have to wait some weeks until we have time to do a proper implementation of Numpy array container such that a mikeio.DataArray can be considered truly array-like |
New method
apply
similar to methods in pandas and xarray for applying a mathematical function to all values in DataArray.