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

Method test_setxor1d

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

Source from the content-addressed store, hash-verified

87 assert_array_equal(ea, b[ui2])
88
89 def test_setxor1d(self):
90 a = np.array([5, 7, 1, 2])
91 b = np.array([2, 4, 3, 1, 5])
92
93 ec = np.array([3, 4, 7])
94 c = setxor1d(a, b)
95 assert_array_equal(c, ec)
96
97 a = np.array([1, 2, 3])
98 b = np.array([6, 5, 4])
99
100 ec = np.array([1, 2, 3, 4, 5, 6])
101 c = setxor1d(a, b)
102 assert_array_equal(c, ec)
103
104 a = np.array([1, 8, 2, 3])
105 b = np.array([6, 5, 4, 8])
106
107 ec = np.array([1, 2, 3, 4, 5, 6])
108 c = setxor1d(a, b)
109 assert_array_equal(c, ec)
110
111 assert_array_equal([], setxor1d([], []))
112
113 def test_setxor1d_unique(self):
114 a = np.array([1, 8, 2, 3])

Callers

nothing calls this directly

Calls 2

setxor1dFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected