Skip to content

ENH: implement non-nano Timedelta scalar #46688

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 17 commits into from
Apr 18, 2022
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
troubleshoot non-mac builds
  • Loading branch information
jbrockmendel committed Apr 8, 2022
commit 58a208d6dc1bc8795f4f0ab2cde80395028c79a2
9 changes: 4 additions & 5 deletions pandas/_libs/tslibs/timedeltas.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ from pandas._libs.tslibs.nattype cimport (
c_nat_strings as nat_strings,
checknull_with_nat,
)

from .np_datetime cimport ( # pandas_datetime_to_datetimestruct,
from pandas._libs.tslibs.np_datetime cimport (
NPY_DATETIMEUNIT,
NPY_FR_ns,
cmp_dtstructs,
cmp_scalar,
get_datetime64_unit,
get_timedelta64_value,
npy_datetimestruct,
pandas_datetime_to_datetimestruct,
pandas_timedelta_to_timedeltastruct,
pandas_timedeltastruct,
)
Expand Down Expand Up @@ -960,10 +960,9 @@ cdef class _Timedelta(timedelta):
npy_datetimestruct dts_self
npy_datetimestruct dts_other

raise NotImplementedError
# dispatch to the datetimestruct utils instead of writing new ones!
#pandas_datetime_to_datetimestruct(self.value, self._reso, &dts_self)
#pandas_datetime_to_datetimestruct(other.value, other._reso, &dts_other)
pandas_datetime_to_datetimestruct(self.value, self._reso, &dts_self)
pandas_datetime_to_datetimestruct(other.value, other._reso, &dts_other)
return cmp_dtstructs(&dts_self, &dts_other, op)

cdef bint _has_ns(self):
Expand Down