Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 3, 2024
1 parent 9ee27a5 commit bd6f39b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 24 deletions.
4 changes: 1 addition & 3 deletions tests/backends/ott/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 1 addition & 7 deletions tests/problems/generic/test_fgw_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions tests/problems/generic/test_gw_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions tests/problems/generic/test_sinkhorn_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bd6f39b

Please sign in to comment.