Skip to content

Commit af57d90

Browse files
author
Vivien Seguy
committed
return log dict in free support barycenter function
1 parent 08e5c0a commit af57d90

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ot/lp/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ def free_support_barycenter(measures_locations, measures_weights, X_init, b=None
278278

279279
X = X_init
280280

281+
log_dict = {}
281282
displacement_square_norms = []
283+
282284
displacement_square_norm = stopThr + 1.
283285

284286
while ( displacement_square_norm > stopThr and iter_count < numItermax ):
@@ -303,6 +305,7 @@ def free_support_barycenter(measures_locations, measures_weights, X_init, b=None
303305
iter_count += 1
304306

305307
if log:
306-
return X, displacement_square_norms
308+
log_dict['displacement_square_norms'] = displacement_square_norms
309+
return X, log_dict
307310
else:
308311
return X

0 commit comments

Comments
 (0)