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

Method test_legpow

numpy/polynomial/tests/test_legendre.py:103–110  ·  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_legpow(self):
104 for i in range(5):
105 for j in range(5):
106 msg = f"At i={i}, j={j}"
107 c = np.arange(i + 1)
108 tgt = reduce(leg.legmul, [c]*j, np.array([1]))
109 res = leg.legpow(c, j)
110 assert_equal(trim(res), trim(tgt), err_msg=msg)
111
112
113class TestEvaluation:

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
trimFunction · 0.70

Tested by

no test coverage detected