Closed
Description
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
(optional) I have confirmed this bug exists on the master branch of pandas.
Due to this change in CPython: python/cpython@a07da09
the following assumption is no longer true:
pandas/pandas/_libs/src/klib/khash_python.h
Lines 183 to 187 in 059c8ba
Here is a failing example:
_____________________ TestIsin.test_different_nan_objects ______________________
self = <pandas.tests.test_algos.TestIsin object at 0x7f9ba1fe7250>
def test_different_nan_objects(self):
# GH 22119
comps = np.array(["nan", np.nan * 1j, float("nan")], dtype=object)
vals = np.array([float("nan")], dtype=object)
expected = np.array([False, False, True])
result = algos.isin(comps, vals)
> tm.assert_numpy_array_equal(expected, result)
pandas/tests/test_algos.py:1039:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
left = array([False, False, True]), right = array([False, False, False])