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

BUG: dt.round with equal/higher freq resolution would not noop #52841

Merged
merged 1 commit into from
Apr 22, 2023

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Apr 21, 2023

@mroeschke mroeschke added the Non-Nano datetime64/timedelta64 with non-nanosecond resolution label Apr 21, 2023
@mroeschke mroeschke added this to the 2.0.1 milestone Apr 21, 2023
@phofl phofl merged commit 84f3591 into pandas-dev:main Apr 22, 2023
@phofl
Copy link
Member

phofl commented Apr 22, 2023

thx @mroeschke

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Apr 22, 2023
phofl pushed a commit that referenced this pull request Apr 22, 2023
…req resolution would not noop) (#52846)

Backport PR #52841: BUG: dt.round with equal/higher freq resolution would not noop

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
nanos = delta_to_nanoseconds(offset, self._creso)
if nanos == 0:
# GH 52761
return self
Copy link
Member

Choose a reason for hiding this comment

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

should this return a copy?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Opened #52982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Non-Nano datetime64/timedelta64 with non-nanosecond resolution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: round, ceil, floor returning incorrect results with Division By Zero warning in pandas-2.0
3 participants