Skip to content

Commit 05b3b96

Browse files
jbrockmendeljreback
authored andcommitted
CI: troubleshoot failures that necessited #27536 (#27545)
1 parent c2293be commit 05b3b96

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

pandas/_libs/index.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ cpdef convert_scalar(ndarray arr, object value):
545545
elif arr.descr.type_num == NPY_TIMEDELTA:
546546
if util.is_array(value):
547547
pass
548-
elif isinstance(value, timedelta):
548+
elif isinstance(value, timedelta) or util.is_timedelta64_object(value):
549549
return Timedelta(value).value
550550
elif util.is_datetime64_object(value):
551551
# exclude np.datetime64("NaT") which would otherwise be picked up

pandas/tests/series/indexing/test_indexing.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -690,13 +690,7 @@ def test_dt64_series_assign_nat(nat_val, should_cast, tz):
690690
"nat_val,should_cast",
691691
[
692692
(pd.NaT, True),
693-
pytest.param(
694-
np.timedelta64("NaT", "ns"),
695-
True,
696-
marks=pytest.mark.xfail(
697-
reason="Platform-specific failures, unknown cause", strict=False
698-
),
699-
),
693+
(np.timedelta64("NaT", "ns"), True),
700694
(np.datetime64("NaT", "ns"), False),
701695
],
702696
)

0 commit comments

Comments
 (0)