From 2d1c206e91ac2f8ed62328d86f959cc141ee8a78 Mon Sep 17 00:00:00 2001 From: Andrei Paleyes Date: Fri, 2 Sep 2022 10:47:38 +0100 Subject: [PATCH] Fix compatibility with scipy 1.9.x --- emukit/bayesian_optimization/local_penalization_calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emukit/bayesian_optimization/local_penalization_calculator.py b/emukit/bayesian_optimization/local_penalization_calculator.py index 18a7670d..d21cf861 100644 --- a/emukit/bayesian_optimization/local_penalization_calculator.py +++ b/emukit/bayesian_optimization/local_penalization_calculator.py @@ -113,7 +113,7 @@ def negative_gradient_norm(x): samples = space.sample_uniform(N_SAMPLES) samples = np.vstack([samples, model.X]) gradient_norm_at_samples = negative_gradient_norm(samples) - x0 = samples[np.argmin(gradient_norm_at_samples)][None, :] + x0 = samples[np.argmin(gradient_norm_at_samples)] # Run optimizer to find point of highest gradient res = scipy.optimize.minimize(