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

Method test_scalar_compare

numpy/core/tests/test_regression.py:123–132  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

121 assert_almost_equal(x**(-1), [1/(1+2j)])
122
123 def test_scalar_compare(self):
124 # Trac Ticket #72
125 # https://github.com/numpy/numpy/issues/565
126 a = np.array(['test', 'auto'])
127 assert_array_equal(a == 'auto', np.array([False, True]))
128 assert_(a[1] == 'auto')
129 assert_(a[0] != 'auto')
130 b = np.linspace(0, 10, 11)
131 assert_array_equal(b != 'auto', np.ones(11, dtype=bool))
132 assert_(b[0] != 'auto')
133
134 def test_unicode_swapping(self):
135 # 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