Skip to content

Commit

Permalink
[FIX] fixing the asymmetric case in search_information
Browse files Browse the repository at this point in the history
  • Loading branch information
fmilisav committed Mar 4, 2024
1 parent 56d97d7 commit 62d7c22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion netneurotools/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def distance_wei_floyd(D):
netneurotools.metrics.retrieve_shortest_path
"""
spl_mat, p_mat = shortest_path(
D, method="FW", directed=False, return_predecessors=True,
D, method="FW", directed=True, return_predecessors=True,
unweighted=False, overwrite=False
)
return spl_mat, p_mat
Expand Down Expand Up @@ -560,6 +560,7 @@ def search_information(W, D, has_memory=False):
for j in range(N):
if i == j: # skip self connection
continue
path = retrieve_shortest_path(i, j, p_mat)
if path[0] != -1: # no path, depends on retrieve_shortest_path
if has_memory:
pr_step_ff = \
Expand Down

0 comments on commit 62d7c22

Please sign in to comment.