mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 01:18:52 -06:00
AlvLouWeh2017: Replace non-finite features by constant
This commit is contained in:
@@ -320,8 +320,10 @@ class FeaturesExtractor:
|
||||
else:
|
||||
f.append(0.0)
|
||||
|
||||
for v in f:
|
||||
assert isfinite(v), f"non-finite elements detected: {f}"
|
||||
for (i, v) in enumerate(f):
|
||||
if not isfinite(v):
|
||||
f[i] = 0.0
|
||||
|
||||
features.append(f)
|
||||
return features
|
||||
|
||||
|
||||
Reference in New Issue
Block a user