We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94ff7db commit 9a18426Copy full SHA for 9a18426
Numerical Integration/adaptive_newton_cotes_rules.py
@@ -77,7 +77,7 @@ def quad_ancr(f, a, b, order=4, rtol=1e-6, atol=1e-10):
77
[1] Adaptive Simpson's method, https://en.wikipedia.org/wiki/Adaptive_Simpson%27s_method
78
[2] Wolfram Mathworld, Newton-Cotes Formulas, https://mathworld.wolfram.com/Newton-CotesFormulas.html
79
"""
80
- if order not in list(range(2, 14, 2)):
+ if order not in range(2, 14, 2):
81
raise ValueError('order argument must be among [2,4,6,8,10,12].')
82
83
if type(rtol) is not float:
@@ -99,4 +99,4 @@ def quad_ancr(f, a, b, order=4, rtol=1e-6, atol=1e-10):
99
100
fa, fb = f(a), f(b)
101
m, fm, whole = _quad_ancr_mem(f, a, b, fa, fb, order)
102
- return _quad_ancr(f, a, m, b, fa, fm, fb, whole, order, rtol, atol)
+ return _quad_ancr(f, a, m, b, fa, fm, fb, whole, order, rtol, atol)
0 commit comments