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

Method test_simple

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

Source from the content-addressed store, hash-verified

419 np.seterr(**self.olderr)
420
421 def test_simple(self):
422 x = np.array([1 + 1j, 0 + 2j, 1 + 2j, np.inf, np.nan])
423 y_r = np.array([np.sqrt(2.), 2, np.sqrt(5), np.inf, np.nan])
424 y = np.abs(x)
425 assert_almost_equal(y, y_r)
426
427 def test_fabs(self):
428 # 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