Skip to content

Commit

Permalink
Merge branch 'master' into pyup-update-networkx-3.1-to-3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhky committed Nov 23, 2023
2 parents 723cea6 + 3c5e887 commit 90767cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/requirements.txt
@@ -1,4 +1,4 @@
numpy==1.26.0
scipy==1.11.2
numpy==1.26.2
scipy==1.11.4
networkx==3.2.1
matplotlib==3.8.0
matplotlib==3.8.2
5 changes: 2 additions & 3 deletions mogutda/vrcomplex.py
Expand Up @@ -17,7 +17,7 @@ def __init__(
):
super(VietorisRipsComplex, self).__init__()
self.pts = points
self.labels = (range(len(self.pts))
self.labels = (list(range(len(self.pts)))
if labels is None or len(labels) != len(self.pts)
else labels)
self.epsilon = epsilon
Expand All @@ -30,8 +30,7 @@ def __init__(
def construct_network(self, points, labels, epsilon, distfcn):
g = nx.Graph()
g.add_nodes_from(labels)
zips = zip(points, labels)
for pair in product(zips, zips):
for pair in product(zip(points, labels), zip(points, labels)):
if pair[0][1] != pair[1][1]:
dist = distfcn(pair[0][0], pair[1][0])
if dist < epsilon:
Expand Down

0 comments on commit 90767cb

Please sign in to comment.