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

Method test_nonzero_byteswap

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

Source from the content-addressed store, hash-verified

1663 assert_array_equal(a2 == a1, [True, False])
1664
1665 def test_nonzero_byteswap(self):
1666 a = np.array([0x80000000, 0x00000080, 0], dtype=np.uint32)
1667 a.dtype = np.float32
1668 assert_equal(a.nonzero()[0], [1])
1669 a = a.byteswap().newbyteorder()
1670 assert_equal(a.nonzero()[0], [1]) # [0] if nonzero() ignores swap
1671
1672 def test_find_common_type_boolean(self):
1673 # Ticket #1695

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
nonzeroMethod · 0.80
byteswapMethod · 0.80

Tested by

no test coverage detected