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

Method test_legdiv

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

Source from the content-addressed store, hash-verified

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