Skip to content

Text repr: remove "Dimensions without coordinates" section #10489

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

benbovy
Copy link
Member

@benbovy benbovy commented Jul 2, 2025

The Dimensions without coordinates section of the Dataset and DataArray text reprs was useful in the context of dimension coordinates with a default index. Since the index refactor, however, it may be more confusing than useful and even inaccurate in the case of non-dimension coordinate or multi-coordinate indexes.

I took the bold step of simply removing that section in this PR. I don't know who is really paying attention to it nowadays, though (there's no equivalent in the html reprs). Alternatively we could keep it and try listing the dimensions more accurately.

@github-actions github-actions bot added topic-documentation topic-plotting topic-rolling topic-DataTree Related to the implementation of a DataTree class labels Jul 2, 2025
@shoyer
Copy link
Member

shoyer commented Jul 17, 2025

I was never a big fan of "Dimensions without coordinates"!

This message does provide a gentle nudge to annotate coordinates on all dimensions, but I'm not sure that's appropriate or necessary. Xarray would definitely be a bit tidier for non-coordinate users if this section was not shown.

Digging back through when we added this, these issues provide the original context:
#1017 (comment)
#1199 (comment)

In particular, the complaint was that it could be hard to notice missing coordinates on DataArray because coordinates can be far below the list of dimensions. So maybe part of this fix could be reversing the order of "Data" and "Coordinates" in the DataArray repr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-DataTree Related to the implementation of a DataTree class topic-plotting topic-rolling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants