Skip to content

Commit

Permalink
Remove test structure
Browse files Browse the repository at this point in the history
  • Loading branch information
wellington36 committed Apr 23, 2023
1 parent 1137cbb commit 265f9bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions acceleration.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,23 @@ def acceleration(series, transform, error=1e-5) -> np.ndarray:
acel = transform(series(n0))
i = -1 # trash

check = np.array([acel[-1], np.log(constants[1]**2/6, dtype=DT)], dtype=DT)
check = np.array([acel[-1], acel[-2]], dtype=DT)
check = np.exp(np.sort(check), dtype=DT)

while np.sum(np.array([-1, 1]) @ check, dtype=DT) > error: # check error
i = i + 1
n = n0 + 2**i
acel = transform(series(n))

check = np.array([acel[-1], np.log(constants[1]**2/6, dtype=DT)], dtype=DT)
check = np.array([acel[-1], acel[-2]], dtype=DT)
check = np.exp(np.sort(check), dtype=DT)

n0 = n0 + 2**(i-1)

while (n > n0):
acel = transform(series(int((n+n0)/2)))

check = np.array([acel[-1], np.log(constants[1]**2/6, dtype=DT)], dtype=DT)
check = np.array([acel[-1], acel[-2]], dtype=DT)
check = np.exp(np.sort(check), dtype=DT)

if np.sum(np.array([-1, 1]) @ check, dtype=DT) > error: # check error
Expand Down

0 comments on commit 265f9bf

Please sign in to comment.