MCPcopy
hub / github.com/numpy/numpy / check_real_value

Function check_real_value

numpy/_core/tests/test_umath_complex.py:544–549  ·  view source on GitHub ↗
(f, x1, y1, x, exact=True)

Source from the content-addressed store, hash-verified

542
543
544def check_real_value(f, x1, y1, x, exact=True):
545 z1 = np.array([complex(x1, y1)])
546 if exact:
547 assert_equal(f(z1), x)
548 else:
549 assert_almost_equal(f(z1), x)
550
551
552def check_complex_value(f, x1, y1, x2, y2, exact=True):

Callers 4

test_cabs_inf_nanMethod · 0.85
test_simpleMethod · 0.85
test_zeroMethod · 0.85
test_special_valuesMethod · 0.85

Calls 3

assert_equalFunction · 0.90
assert_almost_equalFunction · 0.90
fFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…