MCPcopy Index your code
hub / github.com/numpy/numpy / test_intersect1d_array_like

Method test_intersect1d_array_like

numpy/lib/tests/test_arraysetops.py:38–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36 assert_array_equal([], intersect1d([], []))
37
38 def test_intersect1d_array_like(self):
39 # See gh-11772
40 class Test:
41 def __array__(self, dtype=None, copy=None):
42 return np.arange(3)
43
44 a = Test()
45 res = intersect1d(a, a)
46 assert_array_equal(res, a)
47 res = intersect1d([1, 2, 3], [1, 2, 3])
48 assert_array_equal(res, [1, 2, 3])
49
50 def test_intersect1d_indices(self):
51 # unique inputs

Callers

nothing calls this directly

Calls 3

intersect1dFunction · 0.90
assert_array_equalFunction · 0.90
TestClass · 0.70

Tested by

no test coverage detected