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

Method test_simple

numpy/core/tests/test_umath_complex.py:363–367  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

361 np.seterr(**self.olderr)
362
363 def test_simple(self):
364 x = np.array([1+1j, 0+2j, 1+2j, np.inf, np.nan])
365 y_r = x ** 2
366 y = np.power(x, 2)
367 assert_almost_equal(y, y_r)
368
369 def test_scalar(self):
370 x = np.array([1, 1j, 2, 2.5+.37j, np.inf, np.nan])

Callers

nothing calls this directly

Calls 1

assert_almost_equalFunction · 0.90

Tested by

no test coverage detected