We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d3ac76 commit e49407bCopy full SHA for e49407b
dpbench/infrastructure/benchmark_validation.py
@@ -91,7 +91,7 @@ def relative_error(
91
Returns: relative error.
92
"""
93
ref_norm = np.linalg.norm(ref)
94
- if ref_norm:
+ if ref_norm == 0:
95
val_norm = np.linalg.norm(val)
96
if val_norm == 0:
97
return 0.0
0 commit comments