Test that in1d works as expected for bool/int input.
(self, kind)
| 451 | |
| 452 | @pytest.mark.parametrize("kind", [None, "sort", "table"]) |
| 453 | def test_in1d_mixed_boolean(self, kind): |
| 454 | """Test that in1d works as expected for bool/int input.""" |
| 455 | for dtype in np.typecodes["AllInteger"]: |
| 456 | a = np.array([True, False, False], dtype=bool) |
| 457 | b = np.array([0, 0, 0, 0], dtype=dtype) |
| 458 | expected = np.array([False, True, True], dtype=bool) |
| 459 | assert_array_equal(in1d(a, b, kind=kind), expected) |
| 460 | |
| 461 | a, b = b, a |
| 462 | expected = np.array([True, True, True, True], dtype=bool) |
| 463 | assert_array_equal(in1d(a, b, kind=kind), expected) |
| 464 | |
| 465 | def test_in1d_first_array_is_object(self): |
| 466 | ar1 = [None] |
nothing calls this directly
no test coverage detected