Closed jimmymathews closed 1 year ago
I suspect this is coming from PendingProvider queries the quantitative_feature_value table. psycopg2 converts Python's float('nan')
to SQL's NaN
and float('inf')
and float('-inf')
are to Infinity
and -Infinity
for floating-point columns. When the values are pulled down and the float function applied to them, they all convert back to their respective float values. Catching these values and turning them into None when interpreting the SQL result ought to fix this issue.
Occasionally the co-occurrence metric (and perhaps others) cannot be computed due to sparsity etc., in which case a
nan
value is sometimes returned. This should beNone
instead to support automatic conversion to JSON for return value to client applications.