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

Method test_endian_where

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

Source from the content-addressed store, hash-verified

182 assert_(np.all(b[yb] > 0.5))
183
184 def test_endian_where(self):
185 # GitHub issue #369
186 net = np.zeros(3, dtype='>f4')
187 net[1] = 0.00458849
188 net[2] = 0.605202
189 max_net = net.max()
190 test = np.where(net <= 0., max_net, net)
191 correct = np.array([0.60520202, 0.00458849, 0.60520202])
192 assert_array_almost_equal(test, correct)
193
194 def test_endian_recarray(self):
195 # Ticket #2185

Callers

nothing calls this directly

Calls 2

maxMethod · 0.45

Tested by

no test coverage detected