MCPcopy Index your code
hub / github.com/numpy/numpy / test_legdiv

Method test_legdiv

numpy/polynomial/tests/test_legendre.py:90–99  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

88 assert_almost_equal(val3, val1 * val2, err_msg=msg)
89
90 def test_legdiv(self):
91 for i in range(5):
92 for j in range(5):
93 msg = f"At i={i}, j={j}"
94 ci = [0] * i + [1]
95 cj = [0] * j + [1]
96 tgt = leg.legadd(ci, cj)
97 quo, rem = leg.legdiv(tgt, ci)
98 res = leg.legadd(leg.legmul(quo, ci), rem)
99 assert_equal(trim(res), trim(tgt), err_msg=msg)
100
101 def test_legpow(self):
102 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