Skip to content

Commit 3a3e389

Browse files
author
Nathan Cassereau
committed
pep8
1 parent dcb26f9 commit 3a3e389

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ot/gromov.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,7 @@ def gromov_barycenters(N, Cs, ps, p, lambdas, loss_fun,
15811581

15821582
error = []
15831583

1584-
while(err > tol and cpt < max_iter):
1584+
while (err > tol and cpt < max_iter):
15851585
Cprev = C
15861586

15871587
T = [gromov_wasserstein(Cs[s], C, ps[s], p, loss_fun,
@@ -1725,7 +1725,7 @@ def fgw_barycenters(N, Ys, Cs, ps, lambdas, alpha, fixed_structure=False, fixed_
17251725
log_['err_structure'] = []
17261726
log_['Ts_iter'] = []
17271727

1728-
while((err_feature > tol or err_structure > tol) and cpt < max_iter):
1728+
while ((err_feature > tol or err_structure > tol) and cpt < max_iter):
17291729
Cprev = C
17301730
Xprev = X
17311731

ot/lp/cvx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def barycenter(A, M, weights=None, verbose=False, log=False, solver='interior-po
8080
if weights is None:
8181
weights = np.ones(A.shape[1]) / A.shape[1]
8282
else:
83-
assert(len(weights) == A.shape[1])
83+
assert len(weights) == A.shape[1]
8484

8585
n_distributions = A.shape[1]
8686
n = A.shape[0]

ot/unbalanced.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ def barycenter_unbalanced_stabilized(A, M, reg, reg_m, weights=None, tau=1e3,
734734
if weights is None:
735735
weights = nx.ones(n_hists, type_as=A) / n_hists
736736
else:
737-
assert(len(weights) == A.shape[1])
737+
assert len(weights) == A.shape[1]
738738

739739
if log:
740740
log = {'err': []}
@@ -882,7 +882,7 @@ def barycenter_unbalanced_sinkhorn(A, M, reg, reg_m, weights=None,
882882
if weights is None:
883883
weights = nx.ones(n_hists, type_as=A) / n_hists
884884
else:
885-
assert(len(weights) == A.shape[1])
885+
assert len(weights) == A.shape[1]
886886

887887
if log:
888888
log = {'err': []}

0 commit comments

Comments
 (0)