MCPcopy
hub / github.com/numpy/numpy / test_legsub

Method test_legsub

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

Source from the content-addressed store, hash-verified

55 assert_equal(trim(res), trim(tgt), err_msg=msg)
56
57 def test_legsub(self):
58 for i in range(5):
59 for j in range(5):
60 msg = f"At i={i}, j={j}"
61 tgt = np.zeros(max(i, j) + 1)
62 tgt[i] += 1
63 tgt[j] -= 1
64 res = leg.legsub([0] * i + [1], [0] * j + [1])
65 assert_equal(trim(res), trim(tgt), err_msg=msg)
66
67 def test_legmulx(self):
68 assert_equal(leg.legmulx([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