diff --git a/piq/gs.py b/piq/gs.py index 8c8ca370..a5aa8ec5 100644 --- a/piq/gs.py +++ b/piq/gs.py @@ -7,10 +7,10 @@ from typing import Optional, Tuple from multiprocessing import Pool -from scipy.spatial.distance import cdist - import torch +import gudhi import numpy as np +from scipy.spatial.distance import cdist from piq.base import BaseFeatureMetric @@ -96,18 +96,6 @@ def witness( Returns A list of persistence intervals and the maximal persistence value. """ - # Install gudhi only if needed - try: - import gudhi - except ImportError as e: - import six - error = e.__class__( - "You are likely missing your GUDHI installation, " - "you should visit http://gudhi.gforge.inria.fr/python/latest/installation.html " - "for further instructions.\nIf you use conda, you can use\nconda install -c conda-forge gudhi" - ) - six.raise_from(error, e) - N = features.shape[0] if gamma is None: gamma = 1.0 / 128 * N / 5000