summaryrefslogtreecommitdiff
path: root/ot/lp/cvx.py
diff options
context:
space:
mode:
authorvivienseguy <vivienseguy@gmail.com>2018-07-05 18:26:55 +0900
committervivienseguy <vivienseguy@gmail.com>2018-07-05 18:26:55 +0900
commit98ce4ccd3536d95c609ee1c5b737ced85d68f786 (patch)
treed5716a2854e15c9acbb1aa40d09549fa87f7a51e /ot/lp/cvx.py
parent3f23fa1a950ffde4a4224a6343a504a0c5b7851b (diff)
free support barycenter
Diffstat (limited to 'ot/lp/cvx.py')
-rw-r--r--ot/lp/cvx.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ot/lp/cvx.py b/ot/lp/cvx.py
index 91a5922..b74960f 100644
--- a/ot/lp/cvx.py
+++ b/ot/lp/cvx.py
@@ -217,7 +217,7 @@ def free_support_barycenter(measures_locations, measures_weights, X_init, b_init
M_i = ot.dist(X, measure_locations_i)
T_i = ot.emd(b_init, measure_weights_i, M_i)
- T_sum += np.reshape(1. / b_init, (-1, 1)) * np.matmul(T_i, measure_locations_i)
+ T_sum = T_sum + weight_i*np.reshape(1. / b_init, (-1, 1)) * np.matmul(T_i, measure_locations_i)
displacement_square_norm = np.sum(np.square(X-T_sum))
X = T_sum