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

Method test_chebsub

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

Source from the content-addressed store, hash-verified

73 assert_equal(trim(res), trim(tgt), err_msg=msg)
74
75 def test_chebsub(self):
76 for i in range(5):
77 for j in range(5):
78 msg = f"At i={i}, j={j}"
79 tgt = np.zeros(max(i, j) + 1)
80 tgt[i] += 1
81 tgt[j] -= 1
82 res = cheb.chebsub([0]*i + [1], [0]*j + [1])
83 assert_equal(trim(res), trim(tgt), err_msg=msg)
84
85 def test_chebmulx(self):
86 assert_equal(cheb.chebmulx([0]), [0])

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
trimFunction · 0.70
maxFunction · 0.50

Tested by

no test coverage detected