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

Method test_chebadd

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

Source from the content-addressed store, hash-verified

63class TestArithmetic:
64
65 def test_chebadd(self):
66 for i in range(5):
67 for j in range(5):
68 msg = f"At i={i}, j={j}"
69 tgt = np.zeros(max(i, j) + 1)
70 tgt[i] += 1
71 tgt[j] += 1
72 res = cheb.chebadd([0]*i + [1], [0]*j + [1])
73 assert_equal(trim(res), trim(tgt), err_msg=msg)
74
75 def test_chebsub(self):
76 for i in range(5):

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
trimFunction · 0.70
maxFunction · 0.50

Tested by

no test coverage detected