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

Method test_polysub

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

Source from the content-addressed store, hash-verified

66 assert_equal(trim(res), trim(tgt), err_msg=msg)
67
68 def test_polysub(self):
69 for i in range(5):
70 for j in range(5):
71 msg = f"At i={i}, j={j}"
72 tgt = np.zeros(max(i, j) + 1)
73 tgt[i] += 1
74 tgt[j] -= 1
75 res = poly.polysub([0]*i + [1], [0]*j + [1])
76 assert_equal(trim(res), trim(tgt), err_msg=msg)
77
78 def test_polymulx(self):
79 assert_equal(poly.polymulx([0]), [0])

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
trimFunction · 0.70
maxFunction · 0.50

Tested by

no test coverage detected