Skip to content

Commit

Permalink
Wrong change to set initialisation
Browse files Browse the repository at this point in the history
Made this mistake before, it copies the same set
  • Loading branch information
johnlees committed Aug 7, 2024
1 parent 04c5283 commit ffb23de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PopPUNK/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ def printClusters(G, rlist, outPrefix=None, oldClusterFile=None,
if use_gpu:
component_assignments = cugraph.components.connectivity.connected_components(G)
component_frequencies = component_assignments['labels'].value_counts(sort = True, ascending = False)
newClusters = [set() for rank in range(component_frequencies.size)]
newClusters = [set() for _ in range(component_frequencies.size)]
for isolate_index, isolate_name in enumerate(rlist): # assume sorted at the moment
component = component_assignments['labels'].iloc[isolate_index].item()
component_rank_bool = component_frequencies.index == component
Expand Down

0 comments on commit ffb23de

Please sign in to comment.