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

Method test_endian_where

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

Source from the content-addressed store, hash-verified

162 assert_(np.all(b[yb] > 0.5))
163
164 def test_endian_where(self):
165 # GitHub issue #369
166 net = np.zeros(3, dtype='>f4')
167 net[1] = 0.00458849
168 net[2] = 0.605202
169 max_net = net.max()
170 test = np.where(net <= 0., max_net, net)
171 correct = np.array([ 0.60520202, 0.00458849, 0.60520202])
172 assert_array_almost_equal(test, correct)
173
174 def test_endian_recarray(self):
175 # Ticket #2185

Callers

nothing calls this directly

Calls 2

maxMethod · 0.45

Tested by

no test coverage detected