Skip to content

Commit

Permalink
FIX Fix GridSearchCV regression in 1.5 with nested grid
Browse files Browse the repository at this point in the history
  • Loading branch information
lesteve committed May 22, 2024
1 parent 0f27a26 commit 33fb40e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn/model_selection/_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ def _store(key_name, array, weights=None, splits=False, rank=False):
param_list = list(param_result.values())
try:
arr_dtype = np.result_type(*param_list)
except TypeError:
except (TypeError, ValueError):
arr_dtype = object
if len(param_list) == n_candidates and arr_dtype != object:
# Exclude `object` else the numpy constructor might infer a list of
Expand Down

0 comments on commit 33fb40e

Please sign in to comment.