Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes the error caused by scipy 1.8 minimize results changing. #303

Merged
merged 1 commit into from
Jun 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bayes_opt/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def acq_max(ac, gp, y_max, bounds, random_state, n_warmup=10000, n_iter=10):
continue

# Store it if better than previous minimum(maximum).
if max_acq is None or -res.fun[0] >= max_acq:
if max_acq is None or -np.squeeze(res.fun) >= max_acq:
x_max = res.x
max_acq = -res.fun[0]
max_acq = -np.squeeze(res.fun)

# Clip output to make sure it lies within the bounds. Due to floating
# point technicalities this is not always the case.
Expand Down