MCPcopy
hub / github.com/numpy/numpy / test_simple

Method test_simple

numpy/_core/tests/test_umath_complex.py:368–372  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

366 np.seterr(**self.olderr)
367
368 def test_simple(self):
369 x = np.array([1 + 1j, 0 + 2j, 1 + 2j, np.inf, np.nan])
370 y_r = x ** 2
371 y = np.power(x, 2)
372 assert_almost_equal(y, y_r)
373
374 def test_scalar(self):
375 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