From 4f52276e7960cac0b17a34e0d05f3d26715fc6ec Mon Sep 17 00:00:00 2001 From: Veit Heller Date: Tue, 11 Nov 2025 10:32:10 +0100 Subject: [PATCH] CLN: move away from numpy.fix in favor of numpy.trunc --- pandas/_libs/tslibs/timestamps.pyx | 2 +- pandas/core/arrays/datetimes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index 70d0bf433cd44..afbefd9b84461 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -3492,7 +3492,7 @@ default 'raise' year -= 1 month += 12 return (day + - np.fix((153 * month - 457) / 5) + + np.trunc((153 * month - 457) / 5) + 365 * year + np.floor(year / 4) - np.floor(year / 100) + diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 4cf5f4b13890e..9b7ae26bef899 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -2287,7 +2287,7 @@ def to_julian_date(self) -> npt.NDArray[np.float64]: month[testarr] += 12 return ( day - + np.fix((153 * month - 457) / 5) + + np.trunc((153 * month - 457) / 5) + 365 * year + np.floor(year / 4) - np.floor(year / 100)