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.
2 parents e7d8e54 + 7d6fb1c commit 0bab6f2Copy full SHA for 0bab6f2
iotfunctions/stages.py
@@ -202,8 +202,14 @@ def store_derived_metrics(self, dataFrame):
202
rowVals.append(None)
203
204
if metric_type[1]:
205
- myFloat = float(derivedMetricVal)
206
- rowVals.append(myFloat if np.isfinite(myFloat) else None)
+ float_value = float(derivedMetricVal)
+ if np.isfinite(float_value):
207
+ rowVals.append(float_value)
208
+ else:
209
+ # Metric is infinite (np.inf). This can happen after a division by zero in the
210
+ # calculation. We handle infinite values as None. Consequently, nothing to write to
211
+ # db2.
212
+ continue
213
else:
214
215
0 commit comments