Skip to content

Commit 477deed

Browse files
committed
fix error test pep8
1 parent 5c4c4a8 commit 477deed

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

examples/others/plot_lowrank_sinkhorn.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,3 @@
125125
pl.title('Low rank (rank=50)')
126126

127127
pl.tight_layout()
128-

ot/lowrank.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def lowrank_sinkhorn(X_s, X_t, a=None, b=None, reg=0, rank=None, alpha=1e-10, re
309309
init="random", reg_init=None, seed_init=None, gamma_init="rescale",
310310
numItermax=2000, stopThr=1e-7, warn=True, log=False):
311311
r"""
312-
Solve the entropic regularization optimal transport problem under low-nonnegative rank constraints
312+
Solve the entropic regularization optimal transport problem under low-nonnegative rank constraints
313313
on the couplings.
314314
315315
The function solves the following optimization problem:
@@ -343,18 +343,18 @@ def lowrank_sinkhorn(X_s, X_t, a=None, b=None, reg=0, rank=None, alpha=1e-10, re
343343
rank : int, optional. Default is None. (>0)
344344
Nonnegative rank of the OT plan. If None, min(ns, nt) is considered.
345345
alpha : int, optional. Default is 1e-10. (>0 and <1/r)
346-
Lower bound for the weight vector g.
346+
Lower bound for the weight vector g.
347347
rescale_cost : bool, optional. Default is False
348348
Rescale the low rank factorization of the sqeuclidean cost matrix
349-
init : str, optional. Default is 'random'.
349+
init : str, optional. Default is 'random'.
350350
Initialization strategy for the low rank couplings. 'random', 'trivial' or 'kmeans'
351351
reg_init : float, optional. Default is None. (>0)
352352
Regularization term for a 'kmeans' init. If None, 1 is considered.
353353
seed_init : int, optional. Default is None. (>0)
354354
Random state for a 'random' or 'kmeans' init strategy.
355355
gamma_init : str, optional. Default is "rescale".
356356
Initialization strategy for gamma. 'rescale', or 'theory'
357-
Gamma is a constant that scales the convergence criterion of the Mirror Descent
357+
Gamma is a constant that scales the convergence criterion of the Mirror Descent
358358
optimization scheme used to compute the low-rank couplings (Q, R and g)
359359
numItermax : int, optional. Default is 2000.
360360
Max number of iterations for the Dykstra algorithm
@@ -489,4 +489,4 @@ def lowrank_sinkhorn(X_s, X_t, a=None, b=None, reg=0, rank=None, alpha=1e-10, re
489489

490490
return Q, R, g, dict_log
491491

492-
return Q, R, g
492+
return Q, R, g

ot/solvers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from .gaussian import empirical_bures_wasserstein_distance
2424
from .factored import factored_optimal_transport
2525
from .lowrank import lowrank_sinkhorn
26-
from .lowrank import lowrank_sinkhorn
2726

2827
lst_method_lazy = ['1d', 'gaussian', 'lowrank', 'factored', 'geomloss', 'geomloss_auto', 'geomloss_tensorized', 'geomloss_online', 'geomloss_multiscale']
2928

test/test_lowrank.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,3 @@ def test_lowrank_sinkhorn_backends(nx):
120120

121121
np.testing.assert_allclose(ab, P.sum(1), atol=1e-05)
122122
np.testing.assert_allclose(bb, P.sum(0), atol=1e-05)
123-

0 commit comments

Comments
 (0)