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

Method test_hermsub

numpy/polynomial/tests/test_hermite.py:59–67  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

57 assert_equal(trim(res), trim(tgt), err_msg=msg)
58
59 def test_hermsub(self):
60 for i in range(5):
61 for j in range(5):
62 msg = f"At i={i}, j={j}"
63 tgt = np.zeros(max(i, j) + 1)
64 tgt[i] += 1
65 tgt[j] -= 1
66 res = herm.hermsub([0]*i + [1], [0]*j + [1])
67 assert_equal(trim(res), trim(tgt), err_msg=msg)
68
69 def test_hermmulx(self):
70 assert_equal(herm.hermmulx([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