MCPcopy
hub / github.com/numpy/numpy / test_isin_boolean

Method test_isin_boolean

numpy/lib/tests/test_arraysetops.py:384–392  ·  view source on GitHub ↗

Test that isin works for boolean input

(self, kind)

Source from the content-addressed store, hash-verified

382
383 @pytest.mark.parametrize("kind", [None, "sort", "table"])
384 def test_isin_boolean(self, kind):
385 """Test that isin works for boolean input"""
386 a = np.array([True, False])
387 b = np.array([False, False, False])
388 expected = np.array([False, True])
389 assert_array_equal(expected,
390 isin(a, b, kind=kind))
391 assert_array_equal(np.invert(expected),
392 isin(a, b, invert=True, kind=kind))
393
394 @pytest.mark.parametrize("kind", [None, "sort"])
395 def test_isin_timedelta(self, kind):

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
isinFunction · 0.90

Tested by

no test coverage detected