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

Function check_complex_value

numpy/core/tests/test_umath_complex.py:547–554  ·  view source on GitHub ↗
(f, x1, y1, x2, y2, exact=True)

Source from the content-addressed store, hash-verified

545
546
547def check_complex_value(f, x1, y1, x2, y2, exact=True):
548 z1 = np.array([complex(x1, y1)])
549 z2 = complex(x2, y2)
550 with np.errstate(invalid='ignore'):
551 if exact:
552 assert_equal(f(z1), z2)
553 else:
554 assert_almost_equal(f(z1), z2)
555
556class TestSpecialComplexAVX:
557 @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])

Callers 2

test_simpleMethod · 0.85
test_simple_conjugateMethod · 0.85

Calls 3

assert_equalFunction · 0.90
assert_almost_equalFunction · 0.90
fFunction · 0.85

Tested by

no test coverage detected