Skip to content

Commit 106e638

Browse files
committed
add test case from GH-41836
1 parent 19f426c commit 106e638

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/libs/test_hashtable.py

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import pandas as pd
1010
import pandas._testing as tm
11+
from pandas.core.algorithms import isin
1112

1213

1314
@contextmanager
@@ -487,3 +488,12 @@ def test_mode(self, dtype, type_suffix):
487488
values = np.array([42, np.nan, np.nan, np.nan], dtype=dtype)
488489
assert mode(values, True) == 42
489490
assert np.isnan(mode(values, False))
491+
492+
493+
def test_ismember_tuple_with_nans():
494+
# GH-41836
495+
values = [("a", float("nan")), ("b", 1)]
496+
comps = [("a", float("nan"))]
497+
result = isin(values, comps)
498+
expected = np.array([True, False], dtype=np.bool_)
499+
tm.assert_numpy_array_equal(result, expected)

0 commit comments

Comments
 (0)