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

Method test_lagdiv

numpy/polynomial/tests/test_laguerre.py:88–97  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

86 assert_almost_equal(val3, val1*val2, err_msg=msg)
87
88 def test_lagdiv(self):
89 for i in range(5):
90 for j in range(5):
91 msg = f"At i={i}, j={j}"
92 ci = [0]*i + [1]
93 cj = [0]*j + [1]
94 tgt = lag.lagadd(ci, cj)
95 quo, rem = lag.lagdiv(tgt, ci)
96 res = lag.lagadd(lag.lagmul(quo, ci), rem)
97 assert_almost_equal(trim(res), trim(tgt), err_msg=msg)
98
99 def test_lagpow(self):
100 for i in range(5):

Callers

nothing calls this directly

Calls 2

assert_almost_equalFunction · 0.90
trimFunction · 0.70

Tested by

no test coverage detected