From c1ccfc45350f8db3fa78d91b84eb4286bcf36e69 Mon Sep 17 00:00:00 2001 From: Hicham Janati Date: Mon, 9 May 2022 14:30:04 +0200 Subject: [MRG] Fix barycenter mass (#375) * fix transpose in sinkhorn barycenters * add test for assymetric cost barycenters * fix pep8 Co-authored-by: Hicham Janati --- ot/bregman.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ot/bregman.py') 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: -- cgit v1.2.3