Skip to content

Commit 361aa72

Browse files
committed
Merge pull request #8 from fmfn/fmfn-patch-1
Fixes deprecation warning
2 parents f552f5e + 89fc42b commit 361aa72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bayes_opt/bayesian_optimization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def acq_max(ac, gp, ymax, restarts, bounds):
4141
x_try = numpy.asarray([numpy.random.uniform(x[0], x[1], size=1) for x in bounds]).T
4242

4343
#Find the minimum of minus the acquisition function
44-
res = minimize(lambda x: -ac(x, gp=gp, ymax=ymax), x_try, bounds=bounds, method='L-BFGS-B')
44+
res = minimize(lambda x: -ac(x.reshape(-1, 1), gp=gp, ymax=ymax), x_try, bounds=bounds, method='L-BFGS-B')
4545

4646
#Store it if better than previous minimum(maximum).
4747
if -res.fun >= ei_max:

0 commit comments

Comments
 (0)