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

Method test_var_complex_byteorder

numpy/core/tests/test_multiarray.py:6314–6319  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6312 assert_almost_equal(res, tgt)
6313
6314 def test_var_complex_byteorder(self):
6315 # Test that var fast-path does not cause failures for complex arrays
6316 # with non-native byteorder
6317 cmat = self.cmat.copy().astype('complex128')
6318 cmat_swapped = cmat.astype(cmat.dtype.newbyteorder())
6319 assert_almost_equal(cmat.var(), cmat_swapped.var())
6320
6321 def test_var_axis_error(self):
6322 # Ensure that AxisError is raised instead of IndexError when axis is

Callers

nothing calls this directly

Calls 4

assert_almost_equalFunction · 0.90
astypeMethod · 0.80
copyMethod · 0.45
varMethod · 0.45

Tested by

no test coverage detected