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)
def chebpow(cs, pow, maxpower=16): from numpy.polynomial.chebyshev import chebpow return chebpow(cs, pow, maxpower)
def chebpow(cs, pow, maxpower=16) : from numpy.polynomial.chebyshev import chebpow return chebpow(cs, pow, maxpower)