From b9cd8ae9a4543b9ee3aa2ae96eac1262653ae9f3 Mon Sep 17 00:00:00 2001 From: janezd Date: Wed, 20 Mar 2024 20:50:35 +0100 Subject: [PATCH] Fix get neighbors with weights --- orangecontrib/network/network/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/orangecontrib/network/network/base.py b/orangecontrib/network/network/base.py index c65407d..c63b523 100644 --- a/orangecontrib/network/network/base.py +++ b/orangecontrib/network/network/base.py @@ -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):