Skip to content

Commit fa6298f

Browse files
committed
See what the divmod returns
1 parent 8837a71 commit fa6298f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/_libs/tslibs/timedeltas.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ cpdef int64_t delta_to_nanoseconds(
1010
delta, NPY_DATETIMEUNIT reso=*, bint round_ok=*
1111
) except? -1
1212
cpdef int64_t debug_divmod_bug(delta) except? -1
13-
cpdef timedelta debug_2()
13+
cpdef debug_2()
1414
cdef convert_to_timedelta64(object ts, str unit)
1515
cdef bint is_any_td_scalar(object obj)
1616

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,12 @@ def ints_to_pytimedelta(ndarray m8values, box=False):
233233
# ----------------------------------------------------------------------
234234

235235

236-
cpdef timedelta debug_2():
236+
cpdef debug_2():
237237
cdef int64_t val = -420000000000
238238
us, remainder = divmod(val, 1000)
239239
if remainder >= 500:
240240
us += 1
241-
return timedelta(microseconds=us)
241+
return us
242242

243243

244244
cpdef int64_t debug_divmod_bug(delta) except? -1:

0 commit comments

Comments
 (0)