Skip to content

implement Tick division, fix Timedelta.__cmp__ tick #24710

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 6 commits into from
Jan 13, 2019
Merged
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
Next Next commit
Fix comparison
  • Loading branch information
jbrockmendel committed Jan 10, 2019
commit 15eb30e89ee25a60b26a529ab63b1867c1e141d1
4 changes: 2 additions & 2 deletions pandas/_libs/tslibs/timedeltas.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -758,14 +758,14 @@ cdef class _Timedelta(timedelta):

if isinstance(other, _Timedelta):
ots = other
elif PyDelta_Check(other):
elif PyDelta_Check(other) or isinstance(other, Tick):
ots = Timedelta(other)
else:
ndim = getattr(other, "ndim", -1)

if ndim != -1:
if ndim == 0:
if is_timedelta64_object(other) or isinstance(other, Tick):
if is_timedelta64_object(other):
other = Timedelta(other)
else:
if op == Py_EQ:
Expand Down