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

Method test_chebdiv

numpy/polynomial/tests/test_chebyshev.py:103–112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

101 assert_equal(trim(res), trim(tgt), err_msg=msg)
102
103 def test_chebdiv(self):
104 for i in range(5):
105 for j in range(5):
106 msg = f"At i={i}, j={j}"
107 ci = [0]*i + [1]
108 cj = [0]*j + [1]
109 tgt = cheb.chebadd(ci, cj)
110 quo, rem = cheb.chebdiv(tgt, ci)
111 res = cheb.chebadd(cheb.chebmul(quo, ci), rem)
112 assert_equal(trim(res), trim(tgt), err_msg=msg)
113
114 def test_chebpow(self):
115 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