File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -100,16 +100,16 @@ function broadcast_edges(g::GNNGraph, x)
100100 return gather (x, gi)
101101end
102102
103- function _sort_row (matrix:: AbstractArray ; rev:: Bool = true , sortby:: Int = 1 )
104- index = sortperm (view (matrix, :, sortby ); rev)
105- return matrix[index, : ]
103+ function _sort_col (matrix:: AbstractArray ; rev:: Bool = true , sortby:: Int = 1 )
104+ index = sortperm (view (matrix, sortby, : ); rev)
105+ return matrix[ :, index ]
106106end
107107
108108function _sort_matrix (matrix:: AbstractArray , k:: Int ; rev:: Bool = true , sortby = nothing )
109109 if sortby === nothing
110- return sort (matrix, dims = 1 ; rev)[1 : k, : ]
110+ return sort (matrix, dims = 2 ; rev)[:, 1 : k ]
111111 else
112- return _sort_row (matrix; rev, sortby)[1 : k, : ]
112+ return _sort_col (matrix; rev, sortby)[:, 1 : k ]
113113 end
114114end
115115
You can’t perform that action at this time.
0 commit comments