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

Catch either OutOfBoundsTimedelta or OverflowError in CFTimeIndex.__sub__ and CFTimeIndex.__rsub__ #5154

Merged
merged 5 commits into from
Apr 14, 2021

Conversation

spencerkclark
Copy link
Member

@spencerkclark spencerkclark commented Apr 14, 2021

It seems that pandas did not include the change that led to #5006 in their latest release. Perhaps it is safer to just catch either error regardless of the pandas version.

@spencerkclark spencerkclark changed the title Catch either OutOfBoundsTimedelta or OverflowError in CFTiimeIndex.__sub__ and CFTimeIndex.__rsub__ Catch either OutOfBoundsTimedelta or OverflowError in CFTimeIndex.__sub__ and CFTimeIndex.__rsub__ Apr 14, 2021
Copy link
Collaborator

@keewis keewis left a comment

Choose a reason for hiding this comment

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

I've got a style suggestion (which I don't feel strongly about), otherwise looks good to me, too.

xarray/coding/cftimeindex.py Outdated Show resolved Hide resolved
@keewis
Copy link
Collaborator

keewis commented Apr 14, 2021

great. Feel free to merge once CI passes.

@spencerkclark spencerkclark merged commit 9b60f01 into pydata:master Apr 14, 2021
@spencerkclark spencerkclark deleted the fix-pandas-error branch April 14, 2021 13:27
@dcherian
Copy link
Contributor

Thanks spencer!

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.

failing CI due to CFTimeIndex errors
4 participants