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

Method test_simple

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

Source from the content-addressed store, hash-verified

276class TestCsqrt:
277
278 def test_simple(self):
279 # sqrt(1)
280 check_complex_value(np.sqrt, 1, 0, 1, 0)
281
282 # sqrt(1i)
283 rres = 0.5*np.sqrt(2)
284 ires = rres
285 check_complex_value(np.sqrt, 0, 1, rres, ires, False)
286
287 # sqrt(-1)
288 check_complex_value(np.sqrt, -1, 0, 0, 1)
289
290 def test_simple_conjugate(self):
291 ref = np.conj(np.sqrt(complex(1, 1)))

Callers

nothing calls this directly

Calls 1

check_complex_valueFunction · 0.85

Tested by

no test coverage detected