summaryrefslogtreecommitdiff
path: root/src/python/gudhi/wasserstein.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/gudhi/wasserstein.py')
-rw-r--r--src/python/gudhi/wasserstein.py14
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.