Skip to content

Commit 35535c6

Browse files
authored
Merge pull request #303 from samFarrellDay/master
Fixes the error caused by scipy 1.8 minimize results changing.
2 parents 91441fe + b4e09a2 commit 35535c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bayes_opt/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ def acq_max(ac, gp, y_max, bounds, random_state, n_warmup=10000, n_iter=10):
6262
continue
6363

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

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

0 commit comments

Comments
 (0)