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

Function assert_poly_almost_equal

numpy/polynomial/tests/test_classes.py:38–45  ·  view source on GitHub ↗
(p1, p2, msg="")

Source from the content-addressed store, hash-verified

36
37
38def assert_poly_almost_equal(p1, p2, msg=""):
39 try:
40 assert_(np.all(p1.domain == p2.domain))
41 assert_(np.all(p1.window == p2.window))
42 assert_almost_equal(p1.coef, p2.coef)
43 except AssertionError:
44 msg = f"Result: {p1}\nTarget: {p2}"
45 raise AssertionError(msg)
46
47
48#

Callers 9

test_addFunction · 0.85
test_subFunction · 0.85
test_mulFunction · 0.85
test_floordivFunction · 0.85
test_truedivFunction · 0.85
test_modFunction · 0.85
test_divmodFunction · 0.85
test_integFunction · 0.85
test_powFunction · 0.85

Calls 3

assert_Function · 0.90
assert_almost_equalFunction · 0.90
allMethod · 0.45

Tested by

no test coverage detected