-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Where functionality in xarray including else case (dask compability) #1604
Comments
I think the 3-argument version of |
Thank you very much, jhamman, for your comment on #1496 . I would really like that feature. Hopefully, I will find also a way to overcome in my script the problem with simple arithmetic operators on DataSets or DataArrays. I do not like to always access only the data-stream (numpy-array) and not the DataSet or DataArray. |
@rpnaut - You probably don't need to be operating on the If you can create a simpler example of what you're trying to do, I think your use case would make a good StackOverflow question. |
@rpnaut - any update here or should we close this? |
Closed by #1496, I think. |
Yes, |
The where operator does only allow for an 'ifthen' construct, but not for an 'ifthenelse' construct. I cannot explicitly tell which values to write in the data at those places where the condition is not fullfilled. It is automatically a 'NA'. This leads to a lot of computation time and address a lot of memory. |
Use the xarray.where function. It supports the full ternary if/then/else. |
I am faced with the flexibility needed to compute different types of skill scores using xarray. Thus, keeping in mind the attached code - a method for computing a modified mean squared error skill score ("AVSS") - I am fighting with the following problems:
The text was updated successfully, but these errors were encountered: