blob: 0324551ad0c18bd70f9c449e25e239ee046c10c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
|