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

Method test_polymul

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

Source from the content-addressed store, hash-verified

84 assert_equal(poly.polymulx(ser), tgt)
85
86 def test_polymul(self):
87 for i in range(5):
88 for j in range(5):
89 msg = f"At i={i}, j={j}"
90 tgt = np.zeros(i + j + 1)
91 tgt[i + j] += 1
92 res = poly.polymul([0]*i + [1], [0]*j + [1])
93 assert_equal(trim(res), trim(tgt), err_msg=msg)
94
95 def test_polydiv(self):
96 # check zero division

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
trimFunction · 0.70

Tested by

no test coverage detected