with warnings.catch_warnings():
warnings.simplefilter("ignore")
x, a, _ = fmin_l_bfgs_b(
gaussian_acquisition_1D, x0,
args=(gp, np.min(yi), acq_func, xi, kappa),
bounds=space.transformed_bounds,
After Change
cand_xs = np.array([r[0] for r in results])
cand_acqs = np.array([r[1] for r in results])
best_ind = np.argmin(cand_acqs)
a = cand_acqs[best_ind]
if a < best:
next_x, best = cand_xs[best_ind], a
// lbfg should handle this but just in case there are precision errors.
next_x = np.clip(