summaryrefslogtreecommitdiff
path: root/ot/bregman.py
diff options
context:
space:
mode:
authorHicham Janati <hicham.janati100@gmail.com>2022-05-09 14:30:04 +0200
committerGitHub <noreply@github.com>2022-05-09 14:30:04 +0200
commitc1ccfc45350f8db3fa78d91b84eb4286bcf36e69 (patch)
treeab1086116414350346cc678d8e9c3c68a31224cf /ot/bregman.py
parent726e84e1e9f2832ea5ad156f62a5e3636c1fd3d3 (diff)
[MRG] Fix barycenter mass (#375)
* fix transpose in sinkhorn barycenters * add test for assymetric cost barycenters * fix pep8 Co-authored-by: Hicham Janati <hicham.janati@inria.fr>
Diffstat (limited to 'ot/bregman.py')
-rw-r--r--ot/bregman.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ot/bregman.py b/ot/bregman.py
index c06af2f..34dcadb 100644
--- a/ot/bregman.py
+++ b/ot/bregman.py
@@ -1511,7 +1511,7 @@ def barycenter_sinkhorn(A, M, reg, weights=None, numItermax=1000,
for ii in range(numItermax):
- UKv = u * nx.dot(K, A / nx.dot(K, u))
+ UKv = u * nx.dot(K.T, A / nx.dot(K, u))
u = (u.T * geometricBar(weights, UKv)).T / UKv
if ii % 10 == 1: