summaryrefslogtreecommitdiff
path: root/ot
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2018-07-24 14:13:23 +0200
committerRémi Flamary <remi.flamary@gmail.com>2018-07-24 14:13:23 +0200
commit66816cba7cd666706d054bddded1da6035e78c2a (patch)
tree22576bcdf120ecdca80f8accf112a8583d1ae963 /ot
parent209835bc9fade5dc6694158f7e6696ab8e5b53a2 (diff)
pep8 all the way
Diffstat (limited to 'ot')
-rw-r--r--ot/bregman.py6
1 files 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)