Skip to content
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

Forbid invalid Coordinates object #8884

Closed

Conversation

TomNicholas
Copy link
Member

@@ -564,7 +564,7 @@ def merge_coords(

def assert_valid_explicit_coords(
variables: Mapping[Any, Any],
dims: Mapping[Any, int],
dims: Iterable[Any],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this because the lengths are never used, and renamed dims->sizes in a few places to avoid this confusion.

Copy link
Collaborator

@max-sixty max-sixty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Thanks a lot. +2 on making these robust...

@benbovy
Copy link
Member

benbovy commented Mar 28, 2024

Alternatively we might want to drop assert_valid_explicit_coords. This was probably a leftover from relaxing the nD dimension coordinate constraint in the xarray data model in #7989 (xref #8883 (comment)).

@TomNicholas
Copy link
Member Author

Oh! Well that's cool.

Closing in favour of #8886

@TomNicholas TomNicholas deleted the forbid_invalid_coordinates branch March 28, 2024 14:38
@TomNicholas TomNicholas removed the request for review from benbovy March 28, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Coordinates object permits invalid state
3 participants