Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Schefflera-Arboricola committed Feb 11, 2024
1 parent 1fc14d8 commit 3da5d20
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nx_parallel/algorithms/centrality/reaching.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ def as_distance(u, v, d):

centrality = local_reaching_centrality
total_cores = nxp.cpu_count()
lrc = [
Parallel(n_jobs=total_cores)(
lrc = Parallel(n_jobs=total_cores)(
delayed(centrality)(
G, node, paths=paths, weight=weight, normalized=normalized
)
for node, paths in dict(shortest_paths).items()
)
]

max_lrc = max(lrc)
return sum(max_lrc - c for c in lrc) / (len(G) - 1)
Expand Down

0 comments on commit 3da5d20

Please sign in to comment.