Uh oh!
There was an error while loading. Please reload this page.
keep attrs in xarray.where - #4687
Conversation
After thinking about this some more, I decided that it would be good to have the behavior of I also added a entry to Edit: it seems this also preserves the name of |
dcherian
commented
Dec 14, 2020
I guess But that reasoning would also say we should not propagate |
keewis
commented
Dec 14, 2020
yes, that's true. Maybe that's why we did not propagate the |
max-sixty
commented
Dec 15, 2020
I would think the closest match is to return from |
dcherian
commented
Dec 15, 2020
Great idea! |
keewis
commented
Dec 28, 2020
I'm not sure how to implement that: I can get there by replacing |
mathause
commented
Feb 4, 2021
Is that because |
yes, exactly. However, I think it would be easier to extend |
max-sixty
commented
Apr 18, 2021
Shall we merge? |
keewis
commented
Apr 19, 2021
I'm hoping to wait until |
TomNicholas
commented
Jul 9, 2021
rjlauer
commented
Sep 15, 2021
Hi, I have a question about this fix relating to coordinate attributes (and am not sure if that deserves a separate issue): |
yes, that's the plan (we changed the I'm a bit busy right now, but once things calm down a bit I'll try to finish this. |
Illviljan
commented
Dec 29, 2021
Shall we merge this? |
I believe it is best to allow customizing the behavior, so I added a Edit: using a different |
Uh oh!
There was an error while loading. Please reload this page.
dcherian
commented
Jan 19, 2022
Thanks @keewis |
Since that question came up at least twice, this allows changing the behavior of
whereusing thekeep_attrsoption.Dataset.whereandDataArray.wherealways usekeep_attrs=True(set inops.where_method), so we could probably copy that.Edit: we should also document that only the attributes of
condwill be preserved.isort . && black . && mypy . && flake8whats-new.rst