def test_stieltjes():
alpha0, beta0 = orthopy.line.stieltjes(lambda t: 1, -1, +1, 5)
_, _, alpha1, beta1 = \
orthopy.line.recurrence_coefficients.legendre(5, 'monic')
assert (alpha0 == alpha1).all()
assert (beta0 == beta1).all()
return
# def test_expt3():
# '''Full example from Gautschi's "How to and how not to" article.
# '''
# # moments = orthopy.line.compute_moments(
# # lambda x: sympy.exp(-x**3/3),
# # 0, sympy.oo,
# # 31
# # )
# # print(moments)
# # alpha, beta = orthopy.line.chebyshev(moments)
#
# alpha, beta = orthopy.line.stieltjes(
# lambda x: sympy.exp(-x**3/3),
# 0, sympy.oo,
# 5
# )
# print(alpha)
# print(beta)
# return
评论列表
文章目录