summaryrefslogtreecommitdiff
path: root/debian/patches/0009-Keep-POT-optional.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0009-Keep-POT-optional.patch')
-rw-r--r--debian/patches/0009-Keep-POT-optional.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/patches/0009-Keep-POT-optional.patch b/debian/patches/0009-Keep-POT-optional.patch
new file mode 100644
index 00000000..0324551a
--- /dev/null
+++ b/debian/patches/0009-Keep-POT-optional.patch
@@ -0,0 +1,24 @@
+From: Gard Spreemann <gspr@nonempty.org>
+Date: Thu, 4 Jun 2020 14:37:55 +0200
+Subject: Keep POT optional.
+
+---
+ src/python/gudhi/wasserstein/barycenter.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/python/gudhi/wasserstein/barycenter.py b/src/python/gudhi/wasserstein/barycenter.py
+index d67bcde..e376ecc 100644
+--- a/src/python/gudhi/wasserstein/barycenter.py
++++ b/src/python/gudhi/wasserstein/barycenter.py
+@@ -8,7 +8,10 @@
+ # - YYYY/MM Author: Description of the modification
+
+
+-import ot
++try:
++ import ot
++except ImportError:
++ print("POT (Python Optimal Transport) package is not installed.")
+ import numpy as np
+ import scipy.spatial.distance as sc
+