Skip to content

Commit 8b9c050

Browse files
match dtypes
1 parent 088eda5 commit 8b9c050

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/tests/tools/test_to_datetime.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,7 @@ def test_float_to_datetime_raise_near_bounds(self):
16371637
should_succeed = Series(
16381638
[0, tsmax_in_years - 0.05, -tsmax_in_years + 0.05], dtype=float
16391639
)
1640-
expected = should_succeed * oneyear_in_ns
1640+
expected = (should_succeed * oneyear_in_ns).astype(np.int64)
16411641
for error_mode in ["raise", "coerce", "ignore"]:
16421642
result1 = to_datetime(should_succeed, unit="Y", errors=error_mode)
16431643
tm.assert_almost_equal(result1.astype(np.int64), expected, rtol=1e-10)

0 commit comments

Comments
 (0)