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

Method test_in1d_invert

numpy/ma/tests/test_extras.py:1648–1658  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1646 assert_array_equal([], in1d([], []))
1647
1648 def test_in1d_invert(self):
1649 # Test in1d's invert parameter
1650 a = array([1, 2, 5, 7, -1], mask=[0, 0, 0, 0, 1])
1651 b = array([1, 2, 3, 4, 5, -1], mask=[0, 0, 0, 0, 0, 1])
1652 assert_equal(np.invert(in1d(a, b)), in1d(a, b, invert=True))
1653
1654 a = array([5, 5, 2, 1, -1], mask=[0, 0, 0, 0, 1])
1655 b = array([1, 5, -1], mask=[0, 0, 1])
1656 assert_equal(np.invert(in1d(a, b)), in1d(a, b, invert=True))
1657
1658 assert_array_equal([], in1d([], [], invert=True))
1659
1660 def test_union1d(self):
1661 # Test union1d

Callers

nothing calls this directly

Calls 4

arrayFunction · 0.90
assert_equalFunction · 0.90
in1dFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected