From b66e83b45d18d29aaf0d466867a6545face2951f Mon Sep 17 00:00:00 2001 From: GiulioRossetti Date: Mon, 13 May 2024 10:10:42 +0200 Subject: [PATCH] :arrow_up: RSC --- cdlib/algorithms/internal/RSC.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cdlib/algorithms/internal/RSC.py b/cdlib/algorithms/internal/RSC.py index 01735075..8b428509 100644 --- a/cdlib/algorithms/internal/RSC.py +++ b/cdlib/algorithms/internal/RSC.py @@ -35,9 +35,9 @@ def __regularized_laplacian_matrix(adj_matrix, tau): # diags will be zero at points where there is no edge and/or the node you are at # ignore the error and make it zero later - with scipy.errstate(divide="ignore"): - diags_sqrt = 1.0 / scipy.sqrt(diags) - diags_sqrt[scipy.isinf(diags_sqrt)] = 0 + #with scipy.errstate(divide="ignore"): + diags_sqrt = 1.0 / np.sqrt(diags) + diags_sqrt[np.isinf(diags_sqrt)] = 0 D = sp.spdiags(diags_sqrt, [0], m, n, format="csr") L = I - (D.dot(adj_matrix.dot(D)))