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

Method test_setxor1d

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

setxor1dFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected