diff options
author | Rémi Flamary <remi.flamary@gmail.com> | 2018-07-24 14:13:23 +0200 |
---|---|---|
committer | Rémi Flamary <remi.flamary@gmail.com> | 2018-07-24 14:13:23 +0200 |
commit | 66816cba7cd666706d054bddded1da6035e78c2a (patch) | |
tree | 22576bcdf120ecdca80f8accf112a8583d1ae963 /ot | |
parent | 209835bc9fade5dc6694158f7e6696ab8e5b53a2 (diff) |
pep8 all the way
Diffstat (limited to 'ot')
-rw-r--r-- | ot/bregman.py | 6 |
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) |