From af57d90c83c860db5a2160e79aea407ae379f7b0 Mon Sep 17 00:00:00 2001 From: Vivien Seguy Date: Mon, 9 Jul 2018 17:40:41 +0900 Subject: return log dict in free support barycenter function --- ot/lp/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ot/lp/__init__.py') diff --git a/ot/lp/__init__.py b/ot/lp/__init__.py index 96bf6de..02cbd8c 100644 --- a/ot/lp/__init__.py +++ b/ot/lp/__init__.py @@ -278,7 +278,9 @@ def free_support_barycenter(measures_locations, measures_weights, X_init, b=None X = X_init + log_dict = {} displacement_square_norms = [] + displacement_square_norm = stopThr + 1. 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 iter_count += 1 if log: - return X, displacement_square_norms + log_dict['displacement_square_norms'] = displacement_square_norms + return X, log_dict else: return X \ No newline at end of file -- cgit v1.2.3