Skip to content

Commit

Permalink
Fix get neighbors with weights
Browse files Browse the repository at this point in the history
  • Loading branch information
janezd committed Mar 20, 2024
1 parent 76bebcb commit b9cd8ae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions orangecontrib/network/network/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def _compose_neighbours(node: int, matrix: sp.csr_matrix, weights: bool):
if not weights:
return matrix.indices[fr:to]
else:
return np.vstack(np.atleast_2d(matrix.indices[fr:to]),
np.atleast_2d(matrix.data[fr:to]))
return matrix.indices[fr:to], matrix.data[fr:to]

@staticmethod
def _compute_degrees(edges, weighted):
Expand Down

0 comments on commit b9cd8ae

Please sign in to comment.