You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
distance_bin yields incorrect result: output is non-symmetric and does not match scipy.sparse.csgraph.dijkstra
The Matlab version of BCT does not have this problem.
The text was updated successfully, but these errors were encountered:
The problem appears to be that distance_bin does not check if the input is a matrix (which is a likely use case if the graph was converted from scipy.sparse).
Then this shortcut for & is incorrect because * implies matrix (not element-wise) multplication:
L = (nPATH != 0) * (D == 0)
I suggest replacing the * with & since this is the intended function and it is just as fast.
mdarnold1
changed the title
distance_bin yields incorrect result
distance_bin yields incorrect result and does not warn if the input array is a matrix
Dec 16, 2020
distance_bin yields incorrect result: output is non-symmetric and does not match scipy.sparse.csgraph.dijkstra
The Matlab version of BCT does not have this problem.
The text was updated successfully, but these errors were encountered: