issues: 566490806
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
566490806 | MDU6SXNzdWU1NjY0OTA4MDY= | 3774 | Allow xr.combine_by_coords to work with point coordinates? | 555667 | closed | 0 | 13 | 2020-02-17T19:53:51Z | 2021-06-23T15:58:10Z | 2021-06-23T15:58:10Z | NONE | MCVE Code Sample```python Your code heredata_0 = xr.Dataset({'temperature': ('time', [10,20,30])}, coords={'time': [0,1,2]}) data_0.coords['trial'] = 0 data_1 = xr.Dataset({'temperature': ('time', [50,60,70])}, coords={'time': [0,1,2]}) data_1.coords['trial'] = 1 the following fails with a ValueError:all_trials = xr.combine_by_coords([data_0, data_1])but this works:all_trials = xr.combine_by_coords([data_0.expand_dims('trial'), data_1.expand_dims('trial')]) # works ``` Expected outputBoth work and produce the same result. Problem DescriptionI found this behavior somewhat unintuitive -- I didn't understand that I needed to call This would also make code that selects dimensions with On the other hand, this could be seen as "magic", and it might also be a breaking change to Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3774/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |