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

Method test_complex

numpy/lib/tests/test_function_base.py:2284–2289  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2282 assert_almost_equal(corrcoef(self.A, bias=1), self.res1)
2283
2284 def test_complex(self):
2285 x = np.array([[1, 2, 3], [1j, 2j, 3j]])
2286 res = corrcoef(x)
2287 tgt = np.array([[1., -1.j], [1.j, 1.]])
2288 assert_allclose(res, tgt)
2289 assert_(np.all(np.abs(res) <= 1.0))
2290
2291 def test_xy(self):
2292 x = np.array([[1, 2, 3]])

Callers

nothing calls this directly

Calls 4

corrcoefFunction · 0.90
assert_allcloseFunction · 0.90
assert_Function · 0.90
allMethod · 0.45

Tested by

no test coverage detected