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

Method test_simple

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

Source from the content-addressed store, hash-verified

414 np.seterr(**self.olderr)
415
416 def test_simple(self):
417 x = np.array([1+1j, 0+2j, 1+2j, np.inf, np.nan])
418 y_r = np.array([np.sqrt(2.), 2, np.sqrt(5), np.inf, np.nan])
419 y = np.abs(x)
420 assert_almost_equal(y, y_r)
421
422 def test_fabs(self):
423 # Test that np.abs(x +- 0j) == np.abs(x) (as mandated by C99 for cabs)

Callers

nothing calls this directly

Calls 1

assert_almost_equalFunction · 0.90

Tested by

no test coverage detected