From ed77d548aa0447ad5816bfe0a87100908f96fee4 Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Wed, 14 Jul 2021 08:16:49 -0500 Subject: [PATCH] Remove unused function --- miplearn/features.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/miplearn/features.py b/miplearn/features.py index 158c73c..eec166b 100644 --- a/miplearn/features.py +++ b/miplearn/features.py @@ -367,19 +367,13 @@ class FeaturesExtractor: if s is None: continue elif isinstance(s, list): - combined[i].extend([_clipf(sj) for sj in s]) + combined[i].extend([_clip(sj) for sj in s]) else: - combined[i].append(_clipf(s)) + combined[i].append(_clip(s)) return combined -def _clipf(vi: float) -> float: +def _clip(vi: float) -> float: if not isfinite(vi): return max(min(vi, 1e20), -1e20) return vi - - -def _clip(v: List[float]) -> None: - for (i, vi) in enumerate(v): - if not isfinite(vi): - v[i] = max(min(vi, 1e20), -1e20)