Skip to content

BUG: Timestamp.round floating point error #39244

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

Merged
merged 5 commits into from
Jan 21, 2021

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

xref #38964 analogous bug in Timedelta (separate PR upcoming)

ts = pd.Timestamp.max - pd.Timedelta(304)

>>> ts.ceil("s")
Timestamp('1677-09-21 00:12:43.290448384')

@jreback jreback added this to the 1.3 milestone Jan 20, 2021
@jreback jreback added the Datetime Datetime data dtype label Jan 20, 2021
@jreback
Copy link
Contributor

jreback commented Jan 20, 2021

ok lgtm. can you add a whatsnew note.

too bad we can't get numpy to actually check for overflow for us. (or is it possible with https://numpy.org/doc/stable/reference/generated/numpy.seterr.html)?

@jbrockmendel
Copy link
Member Author

too bad we can't get numpy to actually check for overflow for us. (or is it possible with https://numpy.org/doc/stable/reference/generated/numpy.seterr.html)?

AFAICT no. numpy/numpy#16352

@jreback jreback merged commit fb6a334 into pandas-dev:master Jan 21, 2021
@jreback
Copy link
Contributor

jreback commented Jan 21, 2021

thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the bug-ts-round branch January 21, 2021 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants