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)))