Skip to content

Commit 6e5932c

Browse files
committed
fix: 🚧 fix weight problem
Fix weight problem for optional unweighted graphs but it's painfully slow
1 parent 03071c2 commit 6e5932c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nx_parallel/algorithms/centrality/closeness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def closeness_centrality(
2929
if G.is_directed():
3030
G = G.reverse() # create a reversed graph view
3131

32-
A = nxp.floyd_warshall(G, blocking_factor=blocking_factor)
32+
A = nxp.floyd_warshall(G, weight=distance, blocking_factor=blocking_factor)
3333
len_G = len(G)
3434

3535
key_value_pair = Parallel(n_jobs=-1)(

0 commit comments

Comments
 (0)