Skip to content
Snippets Groups Projects
Commit 4e7db60a authored by ArktikHunter's avatar ArktikHunter
Browse files

updated to run on python 3.10

parent 728c0880
No related branches found
No related tags found
1 merge request!21pydtn agkmeans and version 1.0
Pipeline #10633 failed
......@@ -104,10 +104,7 @@ class Community:
graph = self.graph
if not graph.has_edge(node_a, node_b):
graph.add_edge(node_a, node_b, {
'start': None,
'weight': 0,
})
graph.add_edge(node_a, node_b, start = None, weight = 0)
edge = graph[node_a][node_b]
if edge['start'] is None:
......@@ -219,7 +216,7 @@ class KCliqueCommunity(Community):
def partition(self):
"""Partition graph by k-clique communities method."""
return nx.k_clique_communities(self.graph_old, k=self.k)
return nx.algorithms.community.k_clique_communities(self.graph_old, k=self.k)
class LouvainCommunity(Community):
......@@ -237,7 +234,7 @@ class LouvainCommunity(Community):
}
graph.add_nodes_from(nodes)
for node_a, node_b, weight in self.graph_old.edges(data='weight'):
graph.add_edge(id(node_a), id(node_b), {'weight': weight})
graph.add_edge(id(node_a), id(node_b), weight = weight)
partitions = louvain_partition(graph)
......
networkx==1.11
networkx==2.8
simpy==3.0.10
python-louvain==0.8
python-louvain==0.16
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment