Skip to content

Commit

Permalink
Fix: build_c_astar and nx.to_numpy_matrix() (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
heatingma authored Apr 2, 2024
1 parent b98c25a commit fce5782
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pygmtools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}

Expand All @@ -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):
Expand All @@ -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)
Expand All @@ -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,
Expand Down

0 comments on commit fce5782

Please sign in to comment.