def test_adaptive_limits():
"""ensures that the n value given is sufficient for the curve function.
This function has calculated n of 366 on the interval 0 to 2"""
t = symbols('t')
curve_func = t**2 + t + 1
integ = integrate(curve_func, t)
value = lambdify([t], integ)
value = value(2)
print value
apt = abs(adaptive_trapzint(curve, 0, 2)[0]-value)<1E-5
msg = "N is too small."
assert apt, msg
adaptive_trapzint.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录