File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77from typing import Optional , Tuple
88from multiprocessing import Pool
99
10- from scipy .spatial .distance import cdist
11-
1210import torch
11+ import gudhi
1312import numpy as np
13+ from scipy .spatial .distance import cdist
1414
1515from piq .base import BaseFeatureMetric
1616
@@ -96,18 +96,6 @@ def witness(
9696 Returns
9797 A list of persistence intervals and the maximal persistence value.
9898 """
99- # Install gudhi only if needed
100- try :
101- import gudhi
102- except ImportError as e :
103- import six
104- error = e .__class__ (
105- "You are likely missing your GUDHI installation, "
106- "you should visit http://gudhi.gforge.inria.fr/python/latest/installation.html "
107- "for further instructions.\n If you use conda, you can use\n conda install -c conda-forge gudhi"
108- )
109- six .raise_from (error , e )
110-
11199 N = features .shape [0 ]
112100 if gamma is None :
113101 gamma = 1.0 / 128 * N / 5000
You can’t perform that action at this time.
0 commit comments