Exemplo n.º 1
0
 def test_chebpow(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(cheb.chebmul, [c]*j, np.array([1]))
             res = cheb.chebpow(c, j)
             assert_equal(trim(res), trim(tgt), err_msg=msg)
Exemplo n.º 2
0
 def test_chebpow(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(cheb.chebmul, [c]*j, np.array([1]))
             res = cheb.chebpow(c, j)
             assert_equal(trim(res), trim(tgt), err_msg=msg)
Exemplo n.º 3
0
def chebpow(cs, pow, maxpower=16):
    from numpy.polynomial.chebyshev import chebpow
    return chebpow(cs, pow, maxpower)
Exemplo n.º 4
0
def chebpow(cs, pow, maxpower=16) :
    from numpy.polynomial.chebyshev import chebpow
    return chebpow(cs, pow, maxpower)