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

Method test_hermdiv

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

Source from the content-addressed store, hash-verified

89 assert_almost_equal(val3, val1*val2, err_msg=msg)
90
91 def test_hermdiv(self):
92 for i in range(5):
93 for j in range(5):
94 msg = f"At i={i}, j={j}"
95 ci = [0]*i + [1]
96 cj = [0]*j + [1]
97 tgt = herm.hermadd(ci, cj)
98 quo, rem = herm.hermdiv(tgt, ci)
99 res = herm.hermadd(herm.hermmul(quo, ci), rem)
100 assert_equal(trim(res), trim(tgt), err_msg=msg)
101
102 def test_hermpow(self):
103 for i in range(5):

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
trimFunction · 0.70

Tested by

no test coverage detected