Simplify code by dropping support for legacy Python (#1143)

* Simplify code by dropping support for legacy Python

* sort() --> sorted()
This commit is contained in:
Christian Clauss
2019-08-19 15:37:49 +02:00
committed by GitHub
parent 32aa7ff081
commit 47a9ea2b0b
145 changed files with 367 additions and 976 deletions

View File

@@ -7,8 +7,6 @@ method 1:
"extended trapezoidal rule"
"""
from __future__ import print_function
def method_1(boundary, steps):
# "extended trapezoidal rule"
# int(f) = dx/2 * (f1 + 2f2 + ... + fn)
@@ -19,7 +17,7 @@ def method_1(boundary, steps):
y = 0.0
y += (h/2.0)*f(a)
for i in x_i:
#print(i)
#print(i)
y += h*f(i)
y += (h/2.0)*f(b)
return y