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

Method test_hermadd

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

Source from the content-addressed store, hash-verified

47 x = np.linspace(-3, 3, 100)
48
49 def test_hermadd(self):
50 for i in range(5):
51 for j in range(5):
52 msg = f"At i={i}, j={j}"
53 tgt = np.zeros(max(i, j) + 1)
54 tgt[i] += 1
55 tgt[j] += 1
56 res = herm.hermadd([0]*i + [1], [0]*j + [1])
57 assert_equal(trim(res), trim(tgt), err_msg=msg)
58
59 def test_hermsub(self):
60 for i in range(5):

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
trimFunction · 0.70
maxFunction · 0.50

Tested by

no test coverage detected