Skip to content

implement Timedelta mod, divmod, rmod, rdivmod, fix and test scalar methods #19365

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

Closed
wants to merge 19 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
dummy commit to force CI
  • Loading branch information
jbrockmendel committed Feb 17, 2018
commit c22dc473e0473a5f93c9e3bc97d5b19c4ea268ea
1 change: 1 addition & 0 deletions pandas/_libs/tslibs/timedeltas.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,7 @@ class Timedelta(_Timedelta):
return div, self - div * other

def __rdivmod__(self, other):
# Naive implementation, room for optimization
div = other // self
return div, other - div * self

Expand Down