Skip to content

Commit 2a56b4d

Browse files
authored
fix nightly build with Series.to_numpy() on a Timedelta series (#500)
* fix nightly build with Series.to_numpy() on a Timedelta series * just use Timedelta(0)
1 parent 2e48b83 commit 2a56b4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_timefuncs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ def test_types_to_numpy() -> None:
652652
td_s = pd.to_timedelta(pd.Series([10, 20]), "minutes")
653653
check(assert_type(td_s.to_numpy(), np.ndarray), np.ndarray)
654654
check(assert_type(td_s.to_numpy(dtype="int", copy=True), np.ndarray), np.ndarray)
655-
check(assert_type(td_s.to_numpy(na_value=0), np.ndarray), np.ndarray)
655+
check(assert_type(td_s.to_numpy(na_value=pd.Timedelta(0)), np.ndarray), np.ndarray)
656656

657657

658658
def test_to_timdelta_units() -> None:

0 commit comments

Comments
 (0)