diff --git a/RELEASES.md b/RELEASES.md index 2a25f090b..2c6b31134 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -41,6 +41,7 @@ - Fix doc for projection sparse simplex (PR #734, PR #746) - Changed the default behavior of `ot.lp.solver_1d.wasserstein_circle` (Issue #738) - Avoid raising unnecessary warnings in `ot.lp.solver_1d.binary_search_circle` (Issue #738) +- Avoid deprecation warning in `ot.lp.solver_1d.wasserstein_1d` (Issue #760, PR #761) ## 0.9.5 diff --git a/ot/lp/solver_1d.py b/ot/lp/solver_1d.py index 8e9db41d3..49e0c9c41 100644 --- a/ot/lp/solver_1d.py +++ b/ot/lp/solver_1d.py @@ -38,8 +38,8 @@ def quantile_function(qs, cws, xs): if nx.__name__ == "torch": # this is to ensure the best performance for torch searchsorted # and avoid a warning related to non-contiguous arrays - cws = cws.T.contiguous() - qs = qs.T.contiguous() + cws = cws.movedim(0, -1).contiguous() + qs = qs.movedim(0, -1).contiguous() else: cws = cws.T qs = qs.T