From 51c7792313b1afe8600057876524361438360bc6 Mon Sep 17 00:00:00 2001 From: Sam Estep Date: Wed, 13 May 2026 15:39:28 -0400 Subject: [PATCH] Fix the tests for NumPy 2.4 --- tests/test_lbfgs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_lbfgs.py b/tests/test_lbfgs.py index 1af91ef..65e2da9 100644 --- a/tests/test_lbfgs.py +++ b/tests/test_lbfgs.py @@ -28,16 +28,16 @@ def f(x, g, *args): def test_owl_line_search_default(self): def f(x, g, *args): - g[0] = 2 * x - return x ** 2 + g[0] = 2 * x[0] + return x[0] ** 2 with pytest.warns(UserWarning, match="OWL-QN"): xmin = fmin_lbfgs(f, 100., orthantwise_c=1) def test_owl_line_search_warning_explicit(self): def f(x, g, *args): - g[0] = 2 * x - return x ** 2 + g[0] = 2 * x[0] + return x[0] ** 2 with pytest.warns(UserWarning, match="OWL-QN"): xmin = fmin_lbfgs(f, 100., orthantwise_c=1, line_search='default')