From d21c0f52329034a3edc2c521b7e61544883c9ebc Mon Sep 17 00:00:00 2001 From: Sebastian Raschka Date: Tue, 12 Nov 2024 05:41:17 +0900 Subject: [PATCH] Update mlxtend/feature_selection/exhaustive_feature_selector.py Co-authored-by: Peter Gedeck --- mlxtend/feature_selection/exhaustive_feature_selector.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mlxtend/feature_selection/exhaustive_feature_selector.py b/mlxtend/feature_selection/exhaustive_feature_selector.py index 63662b005..4b297ea1e 100644 --- a/mlxtend/feature_selection/exhaustive_feature_selector.py +++ b/mlxtend/feature_selection/exhaustive_feature_selector.py @@ -483,7 +483,11 @@ def ncr(n, r): return self def finalize_fit(self): - max_score = -np.inf + if np.__version__ < "2.0": + ninf = np.NINF + else: + ninf = -np.inf + max_score = ninf for c in self.subsets_: if self.subsets_[c]["avg_score"] > max_score: best_subset = c