From: Gard Spreemann 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