Skip to content

Commit

Permalink
v0.11.3
Browse files Browse the repository at this point in the history
  • Loading branch information
maroba committed Dec 14, 2024
1 parent 96b21ab commit ae03f0c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions tests/test_accuracy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from pprint import pprint

import numpy as np

from findiff import Diff
Expand All @@ -10,7 +8,7 @@ def test_iterative_accuracy():
ns = np.logspace(2, 3, 10)

def compute_errs(acc, plot=False):
import matplotlib.pyplot as plt
# import matplotlib.pyplot as plt

errs_a = []
errs_b = []
Expand Down Expand Up @@ -38,12 +36,12 @@ def compute_errs(acc, plot=False):
errs_b.append(err_b)
errs_c.append(err_c)

if plot:
plt.loglog(ns, errs_a, "-x", label="D^2f")
plt.loglog(ns, errs_b, "-", label="D(D(f))")
plt.loglog(ns, errs_c, "-", label="D*D*f")
plt.grid()
plt.show()
# if plot:
# plt.loglog(ns, errs_a, "-x", label="D^2f")
# plt.loglog(ns, errs_b, "-", label="D(D(f))")
# plt.loglog(ns, errs_c, "-", label="D*D*f")
# plt.grid()
# plt.show()

slope_a = abs(loglog_slope(ns, errs_a))
slope_b = abs(loglog_slope(ns, errs_b))
Expand Down

0 comments on commit ae03f0c

Please sign in to comment.