diff --git a/pygmtools/utils.py b/pygmtools/utils.py index a55bbe3..007a42d 100644 --- a/pygmtools/utils.py +++ b/pygmtools/utils.py @@ -1606,7 +1606,7 @@ def from_networkx(G: nx.Graph): """ is_directed = isinstance(G, nx.DiGraph) - adj_matrix = nx.to_numpy_matrix(G, nodelist=G.nodes()) if is_directed else nx.to_numpy_matrix(G) + adj_matrix = nx.to_numpy_array(G, nodelist=G.nodes()) if is_directed else nx.to_numpy_array(G) return adj_matrix diff --git a/setup.py b/setup.py index 594470a..5d0ae5d 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def get_property(prop, project): VERSION = get_property('__version__', NAME) REQUIRED = [ 'requests>=2.25.1', 'scipy>=1.4.1', 'Pillow>=7.2.0', 'numpy>=1.18.5', 'easydict>=1.7', 'appdirs>=1.4.4', 'tqdm>=4.64.1', - 'async-timeout','aiohttp','networkx>=2.8.8' + 'async-timeout', 'aiohttp', 'networkx>=2.8.8' ] EXTRAS = {} @@ -52,7 +52,7 @@ def get_property(prop, project): class BdistWheelCommand(_bdist_wheel): def run(self): - os.system("python pygmtools/c_astar/get_c_astar.py") + os.system("python pygmtools/c_astar_src/build_c_astar.py") super().run() def get_tag(self): @@ -74,7 +74,7 @@ def get_tag(self): class InstallCommand(_install): def run(self): try: - os.system("python pygmtools/c_astar/get_c_astar.py") + os.system("python pygmtools/c_astar_src/build_c_astar.py") except: pass _install.run(self) @@ -89,7 +89,7 @@ def run(self): author=AUTHOR, url=URL, packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]), - package_data={NAME: ['*.pyd', '*.so', 'astar/*']}, + package_data={NAME: ['*.pyd', '*.so', 'c_astar_src/*']}, install_requires=REQUIRED, extras_require=EXTRAS, include_package_data=True,