Skip to content

Commit 8e94160

Browse files
committed
fix reproducibility issue
The type of new_value is either `npy_timedelta' or `int64_t' In build/pandas/_libs/tslibs/timedeltas.cpython-313-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/timedeltas.pyx.c .. npy_timedelta __pyx_v_new_value; ... In build/pandas/_libs/tslibs/timedeltas.cpython-313-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/timedeltas.pyx.c ... __pyx_t_5numpy_int64_t __pyx_v_new_value; ... Explicitly define it as int64_t to assure the generated source is reproducibility [1] between builds [1] https://reproducible-builds.org/ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
1 parent e4ca405 commit 8e94160

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,6 +2068,9 @@ class Timedelta(_Timedelta):
20682068

20692069
disallow_ambiguous_unit(unit)
20702070

2071+
cdef:
2072+
int64_t new_value;
2073+
20712074
# GH 30543 if pd.Timedelta already passed, return it
20722075
# check that only value is passed
20732076
if isinstance(value, _Timedelta):

0 commit comments

Comments
 (0)