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

Method test_polypow

numpy/polynomial/tests/test_polynomial.py:116–123  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

114 assert_equal(res, tgt, err_msg=msg)
115
116 def test_polypow(self):
117 for i in range(5):
118 for j in range(5):
119 msg = f"At i={i}, j={j}"
120 c = np.arange(i + 1)
121 tgt = reduce(poly.polymul, [c]*j, np.array([1]))
122 res = poly.polypow(c, j)
123 assert_equal(trim(res), trim(tgt), err_msg=msg)
124
125
126class TestEvaluation:

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
trimFunction · 0.70

Tested by

no test coverage detected