Skip to content

Commit 0193c85

Browse files
[pre-commit.ci] pre-commit autoupdate (#48)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.4](astral-sh/ruff-pre-commit@v0.8.6...v0.9.4) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 7d6cdc2 commit 0193c85

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ci:
33

44
repos:
55
- repo: https://github.com/astral-sh/ruff-pre-commit
6-
rev: v0.8.6
6+
rev: v0.9.4
77
hooks:
88
- id: ruff
99
args: [ --fix ]

scripts/bench.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def _plot(all_res: Table, sort=True, fname='bench_results.png', paper=False):
307307
lines.append(f'{const_desc} $\\approx 12{var}$')
308308
else:
309309
lines.append(
310-
f'{const_desc}: {eval(const+"_const")}',
310+
f'{const_desc}: {eval(const + "_const")}',
311311
)
312312
lines = '\n'.join(lines)
313313
ax.annotate(

scripts/compare.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ def _analyze(all_res, fname, plot=True):
9898
nz = denom != 0
9999
frac = np.abs(p1 - p2) / denom
100100
frac = frac[nz]
101-
print(f'\tmax err {np.nanmax(frac)*100:.4g}%')
102-
print(f'\t99% err {np.sort(frac)[int(len(frac)*.99)]*100:.4g}%')
103-
print(f'\t90% err {np.sort(frac)[int(len(frac)*.9)]*100:.4g}%')
104-
print(f'\t75% err {np.sort(frac)[int(len(frac)*.75)]*100:.4g}%')
105-
print(f'\t50% err {np.sort(frac)[int(len(frac)*.50)]*100:.4g}%')
106-
print(f'\trms err / mean {rms_err/rms_mean * 100:.4g}%')
101+
print(f'\tmax err {np.nanmax(frac) * 100:.4g}%')
102+
print(f'\t99% err {np.sort(frac)[int(len(frac) * 0.99)] * 100:.4g}%')
103+
print(f'\t90% err {np.sort(frac)[int(len(frac) * 0.9)] * 100:.4g}%')
104+
print(f'\t75% err {np.sort(frac)[int(len(frac) * 0.75)] * 100:.4g}%')
105+
print(f'\t50% err {np.sort(frac)[int(len(frac) * 0.50)] * 100:.4g}%')
106+
print(f'\trms err / mean {rms_err / rms_mean * 100:.4g}%')
107107

108108
if plot:
109109
freq = f0 + df * np.arange(Nf)

scripts/sweep.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ def _analyze(all_tables, fname, plot=True, paper=False):
140140

141141
print(f'{method} vs {ref}, N={table.meta["N"]}, Nf={table.meta["Nf"]}')
142142
# pretty-print stats with :.4g
143-
print(f'\t99% err {bxp_stats["whishi"]*100:.4g}%')
144-
print(f'\t90% err {bxp_stats["q3"]*100:.4g}%')
145-
print(f'\tmed err {bxp_stats["med"]*100:.4g}%')
143+
print(f'\t99% err {bxp_stats["whishi"] * 100:.4g}%')
144+
print(f'\t90% err {bxp_stats["q3"] * 100:.4g}%')
145+
print(f'\tmed err {bxp_stats["med"] * 100:.4g}%')
146146

147147
if plot:
148148
# _plot_box(all_info, fname)

0 commit comments

Comments
 (0)