From 8071912b3e9d089bac917b68720a7b06fa599a13 Mon Sep 17 00:00:00 2001 From: Shyue Ping Ong Date: Wed, 18 May 2022 13:39:08 -0700 Subject: [PATCH] Fix scipy minimize deprecation --- maml/apps/bowsr/acquisition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maml/apps/bowsr/acquisition.py b/maml/apps/bowsr/acquisition.py index 90871b9d..c0f7b560 100644 --- a/maml/apps/bowsr/acquisition.py +++ b/maml/apps/bowsr/acquisition.py @@ -127,7 +127,7 @@ def min_obj(x): x0 = np.clip(x0, bounds[:, 0] + 3 * EPS, bounds[:, 1] - 3 * EPS) res = minimize(min_obj, x0=x0, bounds=bounds, method="L-BFGS-B") - if -res.fun[0] >= acq_max: + if -float(res.fun) >= acq_max: x_max = res.x return _trunc(scaler.inverse_transform(x_max), decimals=3)