You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was surprised by the following datatree behaviour.
Adding to datatrees, tree1 + tree2, which both have nodes /a and /b, seems to yield the result I'd expect only if a and b appear in the same order (first node: a, second node: b).
If the order in tree1 and tree2 is reversed, then the datasets in the tree tree1 + tree2 have zero data variables.
Thanks for opening your first issue here at xarray! Be sure to follow the issue template!
If you have an idea for a solution, we would really welcome a Pull Request with proposed changes.
See the Contributing Guide for more.
It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better.
Thank you!
Thanks for raising this! You're being a helpful guinea pig by messing around with what's on main right now :)
This was originally intentional behaviour by me, but @shoyer also flagged this as undesirable, and his PR #9636 should make it work as you expect. See #9623 (comment) for a more detailed discussion of the difference in behaviour.
What is your issue?
I was surprised by the following datatree behaviour.
Adding to datatrees,
tree1 + tree2
, which both have nodes/a
and/b
, seems to yield the result I'd expect only ifa
andb
appear in the same order (first node:a
, second node:b
).If the order in
tree1
andtree2
is reversed, then the datasets in the treetree1 + tree2
have zero data variables.Create 2 Trees
output:
tree1
andtree2
are exactly the same except that the order of the subtrees is different.This works as I'd expect
output:
This does not work as I'd expect
output:
You can see, there are no data variables in the dataset. Why does tree1/a not automatically align with tree2/a?
Sorry if I'm missing something obvious. But is this a desired behaviour?
The text was updated successfully, but these errors were encountered: