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

Method test_scalar_compare

numpy/_core/tests/test_regression.py:143–152  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

141 assert_almost_equal(x**(-1), [1 / (1 + 2j)])
142
143 def test_scalar_compare(self):
144 # Trac Ticket #72
145 # https://github.com/numpy/numpy/issues/565
146 a = np.array(['test', 'auto'])
147 assert_array_equal(a == 'auto', np.array([False, True]))
148 assert_(a[1] == 'auto')
149 assert_(a[0] != 'auto')
150 b = np.linspace(0, 10, 11)
151 assert_array_equal(b != 'auto', np.ones(11, dtype=bool))
152 assert_(b[0] != 'auto')
153
154 def test_unicode_swapping(self):
155 # Ticket #79

Callers

nothing calls this directly

Calls 3

assert_array_equalFunction · 0.90
assert_Function · 0.90
linspaceMethod · 0.80

Tested by

no test coverage detected