diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-01-10 19:43:04 +0100 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-01-10 19:43:04 +0100 |
commit | 8f5cb043bf78b8f008b67e292668543a899e6795 (patch) | |
tree | 79724bb0d782a846e84008b893b89741f8604120 /src/python/gudhi/wasserstein.py | |
parent | f61d7c2c9f1148ee1bc749d1f7007f5c01f4ffb4 (diff) |
Reorder import and docstrings. Modify test_representations
Diffstat (limited to 'src/python/gudhi/wasserstein.py')
-rw-r--r-- | src/python/gudhi/wasserstein.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/python/gudhi/wasserstein.py b/src/python/gudhi/wasserstein.py index d8a3104c..1906eeb1 100644 --- a/src/python/gudhi/wasserstein.py +++ b/src/python/gudhi/wasserstein.py @@ -1,10 +1,3 @@ -import numpy as np -import scipy.spatial.distance as sc -try: - import ot -except ImportError: - print("POT (Python Optimal Transport) package is not installed. Try to run $ conda install -c conda-forge pot ; or $ pip install POT") - # This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. # See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. # Author(s): Theo Lacombe @@ -14,6 +7,13 @@ except ImportError: # Modification(s): # - YYYY/MM Author: Description of the modification +import numpy as np +import scipy.spatial.distance as sc +try: + import ot +except ImportError: + print("POT (Python Optimal Transport) package is not installed. Try to run $ conda install -c conda-forge pot ; or $ pip install POT") + def _proj_on_diag(X): ''' :param X: (n x 2) array encoding the points of a persistent diagram. |