MCPcopy Create free account
hub / github.com/numpy/numpy / test_in1d_boolean

Method test_in1d_boolean

numpy/lib/tests/test_arraysetops.py:389–397  ·  view source on GitHub ↗

Test that in1d works for boolean input

(self, kind)

Source from the content-addressed store, hash-verified

387
388 @pytest.mark.parametrize("kind", [None, "sort", "table"])
389 def test_in1d_boolean(self, kind):
390 """Test that in1d works for boolean input"""
391 a = np.array([True, False])
392 b = np.array([False, False, False])
393 expected = np.array([False, True])
394 assert_array_equal(expected,
395 in1d(a, b, kind=kind))
396 assert_array_equal(np.invert(expected),
397 in1d(a, b, invert=True, kind=kind))
398
399 @pytest.mark.parametrize("kind", [None, "sort"])
400 def test_in1d_timedelta(self, kind):

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
in1dFunction · 0.90

Tested by

no test coverage detected