Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] fixing the asymmetric case in search_information #136

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading