Skip to content

Conversation

@TomNicholas
Copy link
Member

@TomNicholas TomNicholas requested a review from benbovy March 28, 2024 02:14
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