Skip to content

Conversation

@mathause
Copy link
Collaborator

@mathause
Copy link
Collaborator Author

No that does not work either because this raises on string coordinates.

@mathause mathause changed the title ensure combine_by_coords raises on different calendars ensure combine_by_coords raises on different types Mar 30, 2021
@mathause mathause requested a review from spencerkclark March 30, 2021 09:18
Copy link
Member

@spencerkclark spencerkclark left a comment

Choose a reason for hiding this comment

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

This looks good to me -- thanks @mathause.

When we address #4853 we may need to adapt this logic again -- there we could have dates with different calendars but the same type -- but I think we can cross that bridge when we get there. We rely on the "different calendar implies different type" assumption in other places in the code as well.

@mathause
Copy link
Collaborator Author

mathause commented Mar 31, 2021

You mean that

cftime.DatetimeNoLeap(2000, 1, 5) == cftime.datetime(2000, 1, 5, calendar="noleap")

? Yes that could be inconvenient but possible... Well yes, let's fix that once we have to...

@mathause mathause merged commit 57a4479 into pydata:master Mar 31, 2021
@mathause mathause deleted the check_cftime_sub branch March 31, 2021 13:36
@spencerkclark
Copy link
Member

@mathause yes, exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants