Test that isin works as expected for bool/int input.
(self, kind)
| 461 | |
| 462 | @pytest.mark.parametrize("kind", [None, "sort", "table"]) |
| 463 | def test_isin_mixed_boolean(self, kind): |
| 464 | """Test that isin works as expected for bool/int input.""" |
| 465 | for dtype in np.typecodes["AllInteger"]: |
| 466 | a = np.array([True, False, False], dtype=bool) |
| 467 | b = np.array([0, 0, 0, 0], dtype=dtype) |
| 468 | expected = np.array([False, True, True], dtype=bool) |
| 469 | assert_array_equal(isin(a, b, kind=kind), expected) |
| 470 | |
| 471 | a, b = b, a |
| 472 | expected = np.array([True, True, True, True], dtype=bool) |
| 473 | assert_array_equal(isin(a, b, kind=kind), expected) |
| 474 | |
| 475 | def test_isin_first_array_is_object(self): |
| 476 | ar1 = [None] |
nothing calls this directly
no test coverage detected