Skip to content

Commit d329bc5

Browse files
authored
CLN: move away from numpy.fix in favor of numpy.trunc (#63074)
1 parent ac6c83b commit d329bc5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3492,7 +3492,7 @@ default 'raise'
34923492
year -= 1
34933493
month += 12
34943494
return (day +
3495-
np.fix((153 * month - 457) / 5) +
3495+
np.trunc((153 * month - 457) / 5) +
34963496
365 * year +
34973497
np.floor(year / 4) -
34983498
np.floor(year / 100) +

pandas/core/arrays/datetimes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2287,7 +2287,7 @@ def to_julian_date(self) -> npt.NDArray[np.float64]:
22872287
month[testarr] += 12
22882288
return (
22892289
day
2290-
+ np.fix((153 * month - 457) / 5)
2290+
+ np.trunc((153 * month - 457) / 5)
22912291
+ 365 * year
22922292
+ np.floor(year / 4)
22932293
- np.floor(year / 100)

0 commit comments

Comments
 (0)