-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
per-variable fill values #4237
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
per-variable fill values #4237
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice to me.
Should we add more tests for higher level functions: for e.g. I think we may need to modify unstack
also (I found this by searching for fill_value
here: https://xarray.pydata.org/en/stable/api.html)
Co-authored-by: Stephan Hoyer <[email protected]>
I have been focusing on functions that use |
Here's the list of functions I'm considering to extend:
|
|
and the code doesn't touch the coordinates (not even non-dimension coordinates). |
I think Same for |
d420eb7
to
e887777
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does anyone have any advice on how to add multiple fill value support to Lines 137 to 171 in d9ebcaf
To fix that, I would manually apply |
I think this would be a fine way to it, though it does feel rather complicated. Per variable fill-values doesn't quite fit the model of |
Ya I can't think of a better way than looping through the variables. |
shall we merge and leave the rest to future PRs? |
👍. I tried modifying As a summary, per-variable fill values for |
Thanks @keewis |
oops this is missing a whats-new entry. |
I'll add one in one of the follow-up PRs |
This allows specifying different fill values per variable, defaulting to
dtypes.NA
. There's no documentation updates, yet: I'll work on that once I'm sure I found every function for which this change makes sense.Here's a demo on how this works:
isort . && black . && mypy . && flake8
whats-new.rst
api.rst