Error with repeated dimension name in DataTree
Open
Nobody has claimed this yet.
bug
topic-DataTree
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
This seems like a real error, even if it is the edge case of two identically-named dimensions...
> assert_identical(unaligned_dict_of_datasets["/Group1"], expected)
E AssertionError: Left and right Dataset objects are not identical
E Differing dimensions:
E (lat: 1, lon: 2) != (lon: 2)
E Differing data variables:
E L group_1_var (lat, lon) float64 16B ...
E R group_1_var (lon, lon) float64 32B ...
Originally posted by @TomNicholas in https://github.com/pydata/xarray/issues/10139#issuecomment-2836130348
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the DataTree case described in the assertion, focusing on the unaligned_dict_of_datasets comparison for /Group1 and the repeated dimension name. Trace how assert_identical reports the differing dimensions and data variables, then verify that the repeated-name case no longer produces an incorrect mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100