This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from OrkoHunter/metis
Put function definitions separate from nxmetis/__init__.py
- Loading branch information
Showing
4 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
This module is a wrapper of the ``_metis`` extension generated | ||
from ``_metis.pyx``. This is to let sphinx import the module for | ||
documentation builds with or without the ``_metis`` extension. | ||
""" | ||
try: | ||
from nxmetis import _metis | ||
except ImportError: | ||
def node_nd(*args, **kwargs): | ||
raise Exception("NetworkX-METIS not installed!") | ||
|
||
def part_graph(*args, **kwargs): | ||
raise Exception("NetworkX-METIS not installed!") | ||
|
||
def compute_vertex_separator(*args, **kwargs): | ||
raise Exception("NetworkX-METIS not installed!") | ||
|
||
def set_default_options(*args, **kwargs): | ||
raise Exception("NetworkX-METIS not installed!") | ||
else: | ||
node_nd = _metis.node_nd | ||
part_graph = _metis.part_graph | ||
compute_vertex_separator = _metis.compute_vertex_separator | ||
set_default_options = _metis.set_default_options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters