Skip to content

Fix BUG: overflow on pd.Timedelta(nanoseconds=) constructor #32424

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

Conversation

roberthdevries
Copy link
Contributor

@roberthdevries roberthdevries commented Mar 3, 2020

Add regression test

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@@ -16,6 +16,8 @@
(1, 1),
(np.int64(2), 2),
(np.int32(3), 3),
(Timedelta(1e10), 1e10),
Copy link
Member

Choose a reason for hiding this comment

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

I think this is worthy of its own test rather than parametrizing - can you separate this out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, no problem. Is it useful to mark the test with a reference to the ticket?
Is this file OK? Or is there a better one?

Copy link
Member

Choose a reason for hiding this comment

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

Totally - just add # GH 32402 in the body of the test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@WillAyd WillAyd added the Timedelta Timedelta data type label Mar 3, 2020
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm

@WillAyd
Copy link
Member

WillAyd commented Mar 4, 2020

@jreback care to take a look?

@roberthdevries roberthdevries force-pushed the fix-34202-overflow-on-pd-timedelta-nanoseconds branch from 422497f to 9ac50f4 Compare March 4, 2020 13:16
@jreback jreback added the Bug label Mar 4, 2020
@jreback jreback added this to the 1.1 milestone Mar 4, 2020
@jreback jreback merged commit 9aaaf1b into pandas-dev:master Mar 4, 2020
@jreback
Copy link
Contributor

jreback commented Mar 4, 2020

thanks @roberthdevries very nice

@roberthdevries roberthdevries deleted the fix-34202-overflow-on-pd-timedelta-nanoseconds branch March 4, 2020 15:43
simonjayhawkins added a commit to simonjayhawkins/pandas that referenced this pull request Mar 4, 2020
SeeminSyed pushed a commit to CSCD01-team01/pandas that referenced this pull request Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: overflow on pd.Timedelta(nanoseconds=) constructor
3 participants