-
-
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
combine_by_coords fails with DataArrays #3248
Comments
+1 we should make this work! |
@dcherian is this a |
What do you think of:
So really it's just (1) that needs a special case in the combine functions? |
Some additional information on the topic: Combining named 1D data arrays works.
However, when combining 2D gridded data...
...the method fails, despite passing a data variable name.
Again, converting to a dataset bypasses the issue.
|
Thanks @friedrichknuth . It looks like all the It should be relatively easily to make this work like Lines 593 to 602 in 756c941
Can you send in a PR? |
Hello, |
Hi @aijams — this issue is still current! There are some notes from @TomNicholas on this PR: #3312. Though it looks like there may be an outstanding question on @shoyer there. @TomNicholas any thoughts on whether this is ready for a contribution? |
Hi @max-sixty good question, and it would be nice to fix this! I think that if we go with the scheme suggested by @dcherian for handling this issue then it answers the question I posed in #3312 - the answer being that we care more about (I think that this bug mentioned in #3312 is separate, and possibly deserves its own small issue.) |
My comprehension of the I'm assuming the main issue here is to have @TomNicholas, does this seem accurate to you? |
@aijams while that isn't quite how I think about it, I think that is an accurate description of what
Yes - which involves making the assumption that these different unnamed DataArrays are actually the same physical variable, and so can be meaningfully combined into a group. |
It looks like this issue has been neglected for a while. |
MCVE Code Sample
To get what I want, I need
xr.combine_by_coords([da1.to_dataset(name='a'), da2.to_dataset(name='a')]).a
I think the issue is that the code uses
to_dataset
instead of_to_temp_dataset
The text was updated successfully, but these errors were encountered: