MCPcopy Index your code
hub / github.com/numpy/numpy / test_simple

Method test_simple

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

Source from the content-addressed store, hash-verified

281class TestCsqrt:
282
283 def test_simple(self):
284 # sqrt(1)
285 check_complex_value(np.sqrt, 1, 0, 1, 0)
286
287 # sqrt(1i)
288 rres = 0.5 * np.sqrt(2)
289 ires = rres
290 check_complex_value(np.sqrt, 0, 1, rres, ires, False)
291
292 # sqrt(-1)
293 check_complex_value(np.sqrt, -1, 0, 0, 1)
294
295 def test_simple_conjugate(self):
296 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