test_line_orthopy.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:orthopy 作者: nschloe 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号