From a19566013192bae54e91b4f6403629800258ed4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Flamary?= Date: Tue, 25 Jun 2024 10:30:11 +0200 Subject: [PATCH] [Fix] import linesearch for modern scipy (#642) * update import for scalar armijo * add release line in file --- RELEASES.md | 1 + ot/optim.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 55f5b0b17..56cb6fd4b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -22,6 +22,7 @@ - Fix (F)GW barycenter functions to support computing barycenter on 1 input + deprecate structures as lists (PR #628) - Fix line-search in partial GW and change default init to the interior of partial transport plans (PR #602) - Fix `ot.da.sinkhorn_lpl1_mm` compatibility with JAX (PR #592) +- Fiw linesearch import error on Scipy 1.14 (PR #642, Issue #641) ## 0.9.3 *January 2024* diff --git a/ot/optim.py b/ot/optim.py index dcdef6a88..fe5eda821 100644 --- a/ot/optim.py +++ b/ot/optim.py @@ -19,7 +19,7 @@ try: from scipy.optimize import scalar_search_armijo except ImportError: - from scipy.optimize.linesearch import scalar_search_armijo + from scipy.optimize._linesearch import scalar_search_armijo # The corresponding scipy function does not work for matrices