def test_legpow(self):
     for i in range(5):
         for j in range(5):
             msg = "At i=%d, j=%d" % (i, j)
             c = np.arange(i + 1)
             tgt = reduce(leg.legmul, [c] * j, np.array([1]))
             res = leg.legpow(c, j)
             assert_equal(trim(res), trim(tgt), err_msg=msg)
Exemple #2
0
 def test_legpow(self):
     for i in range(5):
         for j in range(5):
             msg = "At i=%d, j=%d" % (i, j)
             c = np.arange(i + 1)
             tgt = reduce(leg.legmul, [c]*j, np.array([1]))
             res = leg.legpow(c, j) 
             assert_equal(trim(res), trim(tgt), err_msg=msg)
Exemple #3
0
def legpow(cs, pow, maxpower=16):
    from numpy.polynomial.legendre import legpow
    return legpow(cs, pow, maxpower)
Exemple #4
0
def legpow(cs, pow, maxpower=16) :
    from numpy.polynomial.legendre import legpow
    return legpow(cs, pow, maxpower)