test_trapz.py 文件源码

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

项目:IntroPython2016 作者: UWPCE-PythonCert 项目源码 文件源码
def test_quadratic_trapz_args_kwargs():
    """
    Testing if you can pass a combination of positional and keyword arguments
    one case: A=2, B=-4, C=3
    """
    A, B, C = 2, -4, 3
    a, b = -2, 2
    assert isclose(trapz(quadratic, a, b, A, B, C=C),
                   quad_solution(a, b, A, B, C),
                   rel_tol=1e-3)  # not a great tolerance -- maybe should try more samples!
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号