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

Method test_void_copyswap

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

Source from the content-addressed store, hash-verified

508 assert_equal(np.array([]).dtype, np.zeros(0).dtype)
509
510 def test_void_copyswap(self):
511 dt = np.dtype([('one', '<i4'), ('two', '<i4')])
512 x = np.array((1, 2), dtype=dt)
513 x = x.byteswap()
514 assert_(x['one'] > 1 and x['two'] > 2)
515
516 def test_method_args(self):
517 # Make sure methods and functions have same default axis

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
byteswapMethod · 0.80
dtypeMethod · 0.45

Tested by

no test coverage detected