From bd6f39bedde047e936e051e05ce02269bf666f6c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:47:53 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/backends/ott/test_backend.py | 4 +--- tests/problems/generic/test_fgw_problem.py | 8 +------- tests/problems/generic/test_gw_problem.py | 8 +------- tests/problems/generic/test_sinkhorn_problem.py | 8 +------- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/tests/backends/ott/test_backend.py b/tests/backends/ott/test_backend.py index f982bf148..51c996946 100644 --- a/tests/backends/ott/test_backend.py +++ b/tests/backends/ott/test_backend.py @@ -68,9 +68,7 @@ def test_solver_rank(self, y: Geom_t, rank: Optional[int], initializer: str): np.testing.assert_allclose(solver._problem.geom.cost_matrix, problem.geom.cost_matrix, rtol=RTOL, atol=ATOL) np.testing.assert_allclose(gt.matrix, pred.transport_matrix, rtol=RTOL, atol=ATOL) - @pytest.mark.parametrize( - ("rank", "cost_fn"), [(2, costs.Euclidean()), (3, costs.SqPNorm(p=1.5))] - ) + @pytest.mark.parametrize(("rank", "cost_fn"), [(2, costs.Euclidean()), (3, costs.SqPNorm(p=1.5))]) def test_geometry_rank(self, x: Geom_t, rank: int, cost_fn: costs.CostFn): eps = 0.05 geom = PointCloud(x, epsilon=eps, cost_fn=cost_fn).to_LRCGeometry(rank=rank) diff --git a/tests/problems/generic/test_fgw_problem.py b/tests/problems/generic/test_fgw_problem.py index c866c9587..143caab76 100644 --- a/tests/problems/generic/test_fgw_problem.py +++ b/tests/problems/generic/test_fgw_problem.py @@ -5,13 +5,7 @@ import numpy as np import pandas as pd from ott.geometry import epsilon_scheduler -from ott.geometry.costs import ( - Cosine, - Euclidean, - PNormP, - SqEuclidean, - SqPNorm, -) +from ott.geometry.costs import Cosine, Euclidean, PNormP, SqEuclidean, SqPNorm from ott.solvers.linear import acceleration from anndata import AnnData diff --git a/tests/problems/generic/test_gw_problem.py b/tests/problems/generic/test_gw_problem.py index d72893304..2fab94b5c 100644 --- a/tests/problems/generic/test_gw_problem.py +++ b/tests/problems/generic/test_gw_problem.py @@ -5,13 +5,7 @@ import numpy as np import pandas as pd from ott.geometry import epsilon_scheduler -from ott.geometry.costs import ( - Cosine, - Euclidean, - PNormP, - SqEuclidean, - SqPNorm, -) +from ott.geometry.costs import Cosine, Euclidean, PNormP, SqEuclidean, SqPNorm from ott.solvers.linear import acceleration from anndata import AnnData diff --git a/tests/problems/generic/test_sinkhorn_problem.py b/tests/problems/generic/test_sinkhorn_problem.py index 03acf0962..64a9bf249 100644 --- a/tests/problems/generic/test_sinkhorn_problem.py +++ b/tests/problems/generic/test_sinkhorn_problem.py @@ -5,13 +5,7 @@ import numpy as np import pandas as pd from ott.geometry import epsilon_scheduler -from ott.geometry.costs import ( - Cosine, - Euclidean, - PNormP, - SqEuclidean, - SqPNorm, -) +from ott.geometry.costs import Cosine, Euclidean, PNormP, SqEuclidean, SqPNorm from ott.solvers.linear import acceleration from anndata import AnnData