def test_chebmulx(self): assert_equal(cheb.chebmulx([0]), [0]) assert_equal(cheb.chebmulx([1]), [0,1]) for i in range(1, 5): ser = [0]*i + [1] tgt = [0]*(i - 1) + [.5, 0, .5] assert_equal(cheb.chebmulx(ser), tgt)
def test_chebmulx(self): assert_equal(cheb.chebmulx([0]), [0]) assert_equal(cheb.chebmulx([1]), [0, 1]) for i in range(1, 5): ser = [0]*i + [1] tgt = [0]*(i - 1) + [.5, 0, .5] assert_equal(cheb.chebmulx(ser), tgt)
def chebmulx(cs): from numpy.polynomial.chebyshev import chebmulx return chebmulx(cs)
def xmul(self, x): return np_cheb.chebmulx(x)