From f770f8903b982e131871ec9c64d0454066825183 Mon Sep 17 00:00:00 2001 From: ymuhamma01 <123507342+ymuhamma01@users.noreply.github.com> Date: Mon, 27 Mar 2023 19:00:08 -0400 Subject: [PATCH] Update girvan_newman.py To resolve my issue --- communities/algorithms/girvan_newman.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/communities/algorithms/girvan_newman.py b/communities/algorithms/girvan_newman.py index 14527d9..44b92a5 100644 --- a/communities/algorithms/girvan_newman.py +++ b/communities/algorithms/girvan_newman.py @@ -61,7 +61,7 @@ def animation_data(A, P_history, Q_history): def girvan_newman(adj_matrix : np.ndarray, n : int = None) -> list: M = modularity_matrix(adj_matrix) - G = nx.from_numpy_matrix(adj_matrix) + G = nx.from_numpy_array(adj_matrix) num_nodes = G.number_of_nodes() G.remove_edges_from(nx.selfloop_edges(G))