From 66816cba7cd666706d054bddded1da6035e78c2a Mon Sep 17 00:00:00 2001 From: RĂ©mi Flamary Date: Tue, 24 Jul 2018 14:13:23 +0200 Subject: pep8 all the way --- ot/bregman.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ot/bregman.py b/ot/bregman.py index 26b7b53..ab84bcf 100644 --- a/ot/bregman.py +++ b/ot/bregman.py @@ -378,9 +378,9 @@ def sinkhorn_knopp(a, b, M, reg, numItermax=1000, err = np.sum((u - uprev)**2) / np.sum((u)**2) + \ np.sum((v - vprev)**2) / np.sum((v)**2) else: - # compute right marginal tmp2= (diag(u)Kdiag(v))^T1 - np.einsum('i,ij,j->j',u,K,v,out=tmp2) - err = np.linalg.norm(tmp2-b)**2 # violation of marginal + # compute right marginal tmp2= (diag(u)Kdiag(v))^T1 + np.einsum('i,ij,j->j', u, K, v, out=tmp2) + err = np.linalg.norm(tmp2 - b)**2 # violation of marginal if log: log['err'].append(err) -- cgit v1.2.3