def test_lagpow(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(lag.lagmul, [c]*j, np.array([1])) res = lag.lagpow(c, j) assert_equal(trim(res), trim(tgt), err_msg=msg)
def test_lagpow(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(lag.lagmul, [c]*j, np.array([1])) res = lag.lagpow(c, j) assert_equal(trim(res), trim(tgt), err_msg=msg)