1
1
import numpy as np
2
2
import pytest
3
3
4
- from pandas .compat import PYPY
5
-
6
4
from pandas import MultiIndex
7
5
import pandas ._testing as tm
8
6
9
7
10
- @pytest .mark .skipif (not PYPY , reason = "tuples cmp recursively on PyPy" )
11
- def test_isin_nan_pypy ():
8
+ def test_isin_nan ():
12
9
idx = MultiIndex .from_arrays ([["foo" , "bar" ], [1.0 , np .nan ]])
13
10
tm .assert_numpy_array_equal (idx .isin ([("bar" , np .nan )]), np .array ([False , True ]))
14
11
tm .assert_numpy_array_equal (
@@ -31,15 +28,6 @@ def test_isin():
31
28
assert result .dtype == np .bool_
32
29
33
30
34
- @pytest .mark .skipif (PYPY , reason = "tuples cmp recursively on PyPy" )
35
- def test_isin_nan_not_pypy ():
36
- idx = MultiIndex .from_arrays ([["foo" , "bar" ], [1.0 , np .nan ]])
37
- tm .assert_numpy_array_equal (idx .isin ([("bar" , np .nan )]), np .array ([False , False ]))
38
- tm .assert_numpy_array_equal (
39
- idx .isin ([("bar" , float ("nan" ))]), np .array ([False , False ])
40
- )
41
-
42
-
43
31
def test_isin_level_kwarg ():
44
32
idx = MultiIndex .from_arrays ([["qux" , "baz" , "foo" , "bar" ], np .arange (4 )])
45
33
0 commit comments