diff --git a/pyproject.toml b/pyproject.toml index c8f35a2..df67ce3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] -dependencies = ["numpy", "scipy", "matplotlib", "pandas", "dask", "networkx"] +dependencies = ["numpy", "scipy", "matplotlib", "pandas", "dask", "networkx>=3.2.1"] dynamic = ["version"] [project.urls] diff --git a/src/track_linearization/core.py b/src/track_linearization/core.py index 81913af..5377bc3 100644 --- a/src/track_linearization/core.py +++ b/src/track_linearization/core.py @@ -149,7 +149,7 @@ def route_distance(candidates_t_1, candidates_t, track_graph): # calculate path distance path_distance = scipy.sparse.csgraph.dijkstra( - nx.to_scipy_sparse_matrix(track_graph, weight="distance") + nx.to_scipy_sparse_array(track_graph, weight="distance") ) n_total_nodes = len(track_graph.nodes) node_ind = np.arange(n_total_nodes)