Skip to content

Commit b57cdc6

Browse files
committed
Ensure error values of float type
1 parent c663e88 commit b57cdc6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

benchmarks/benchmarking.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -448,12 +448,12 @@ def run_benchmarks(
448448
results_entry["traced_memory_final_in_bytes"] = current_size
449449
results_entry["traced_memory_peak_in_bytes"] = peak_size
450450
if reference_output is not None and output is not None:
451-
results_entry["max_abs_error"] = abs(
452-
reference_output - output
453-
).max()
454-
results_entry["mean_abs_error"] = abs(
455-
reference_output - output
456-
).mean()
451+
results_entry["max_abs_error"] = float(
452+
abs(reference_output - output).max()
453+
)
454+
results_entry["mean_abs_error"] = float(
455+
abs(reference_output - output).mean()
456+
)
457457
run_times = [
458458
time / number_runs
459459
for time in timeit.repeat(

0 commit comments

Comments
 (0)