Skip to content

Commit

Permalink
Backport PR #60416 on branch 2.3.x (TST: Avoid hashing np.timedelta64…
Browse files Browse the repository at this point in the history
… without unit) (#60418)

Backport PR #60416: TST: Avoid hashing np.timedelta64 without unit
  • Loading branch information
mroeschke authored Nov 25, 2024
1 parent 112c2e9 commit 3bcbf0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/tests/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ def test_value_counts_nat(self):
result_dt = algos.value_counts(dt)
tm.assert_series_equal(result_dt, exp_dt)

exp_td = Series({np.timedelta64(10000): 1}, name="count")
exp_td = Series([1], index=[np.timedelta64(10000)], name="count")
with tm.assert_produces_warning(FutureWarning, match=msg):
result_td = algos.value_counts(td)
tm.assert_series_equal(result_td, exp_td)
Expand Down

0 comments on commit 3bcbf0c

Please sign in to comment.