diff --git a/hypernetx/classes/hypergraph.py b/hypernetx/classes/hypergraph.py index 2a3c3037..4583fa98 100644 --- a/hypernetx/classes/hypergraph.py +++ b/hypernetx/classes/hypergraph.py @@ -1858,7 +1858,7 @@ def node_diameters(self, s=1): list of the s-component nodes """ A, coldict = self.adjacency_matrix(s=s, index=True) - G = nx.from_scipy_sparse_matrix(A) + G = nx.from_scipy_sparse_array(A) diams = [] comps = [] for c in nx.connected_components(G): @@ -1892,7 +1892,7 @@ def edge_diameters(self, s=1): """ A, coldict = self.edge_adjacency_matrix(s=s, index=True) - G = nx.from_scipy_sparse_matrix(A) + G = nx.from_scipy_sparse_array(A) diams = [] comps = [] for c in nx.connected_components(G): @@ -1933,7 +1933,7 @@ def diameter(self, s=1): """ A = self.adjacency_matrix(s=s) - G = nx.from_scipy_sparse_matrix(A) + G = nx.from_scipy_sparse_array(A) if nx.is_connected(G): return nx.diameter(G) @@ -1967,7 +1967,7 @@ def edge_diameter(self, s=1): """ A = self.edge_adjacency_matrix(s=s) - G = nx.from_scipy_sparse_matrix(A) + G = nx.from_scipy_sparse_array(A) if nx.is_connected(G): return nx.diameter(G) diff --git a/setup.cfg b/setup.cfg index c195f0e7..900b2fa9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -60,7 +60,7 @@ packages = hypernetx.utils hypernetx.utils.toys install_requires = - networkx>=2.2,<3.0 + networkx>=2.2,<4.0 numpy>=1.24.0,<2.0 scipy>=1.1.0,<2.0 matplotlib>3.0