summaryrefslogtreecommitdiff
path: root/examples/barycenters/plot_free_support_barycenter.py
diff options
context:
space:
mode:
authorRomain Tavenard <romain.tavenard@univ-rennes2.fr>2020-05-04 11:19:35 +0200
committerGitHub <noreply@github.com>2020-05-04 11:19:35 +0200
commite65c1f745cf2eacc6672727e7a3869efd8318768 (patch)
tree71590cd404f31806a5a99f0cf8faa8d9dca6b42e /examples/barycenters/plot_free_support_barycenter.py
parent98d6cdcfa3a24ba07b9b4428250b7aee7e62f1ea (diff)
[WIP] Improved docs and changed scipy version (#163)
* Improved docs and changed scipy version * Fixed dependency bug in setup.py * dependencies set to minimal versions for tests * add requirements file * added minimal version build for scipy (testing 1.2) * bugfix in minimal deps build * (yet another) bugfix in minimal deps build * minimal deps now reflect README.md * minimal deps: no autograd nor pymanopt * refactored workflow names * minimal deps: no doctests * minimal deps: numpy 1.16 * trigger GH Actions on PR * better merge * re-add minimal-deps... * bugfix in yaml * enforce np>=1.16 * enforce scipy and cython versions too * requires / install_requires * requires / install_requires / requires * setup_requires Co-authored-by: RĂ©mi Flamary <remi.flamary@gmail.com>
Diffstat (limited to 'examples/barycenters/plot_free_support_barycenter.py')
-rw-r--r--examples/barycenters/plot_free_support_barycenter.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/barycenters/plot_free_support_barycenter.py b/examples/barycenters/plot_free_support_barycenter.py
index 64b89e4..27ddc8e 100644
--- a/examples/barycenters/plot_free_support_barycenter.py
+++ b/examples/barycenters/plot_free_support_barycenter.py
@@ -4,7 +4,7 @@
2D free support Wasserstein barycenters of distributions
====================================================
-Illustration of 2D Wasserstein barycenters if discributions that are weighted
+Illustration of 2D Wasserstein barycenters if distributions are weighted
sum of diracs.
"""
@@ -21,7 +21,7 @@ import ot
##############################################################################
# Generate data
# -------------
-#%% parameters and data generation
+
N = 3
d = 2
measures_locations = []
@@ -46,7 +46,7 @@ for i in range(N):
##############################################################################
# Compute free support barycenter
-# -------------
+# -------------------------------
k = 10 # number of Diracs of the barycenter
X_init = np.random.normal(0., 1., (k, d)) # initial Dirac locations