Skip to content

Commit

Permalink
fix(mtnetwork): add import check
Browse files Browse the repository at this point in the history
try to import HyPhy before use
in transmission_network.fit_degree_distribution

closes veg#40
  • Loading branch information
FynnFreyer committed Nov 8, 2023
1 parent ccd648a commit 2327969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hivclustering/mtnetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -2509,8 +2509,8 @@ def fit_degree_distribution(self, degree_option=None, hy_instance=None):
try:
import hppy as hy
except ImportError:
raise ImportError("Optional dependencies not found. please install the 'edgefiltering' extras to use this function: pip install hivclustering[edgefiltering]")

raise ImportError(
"Optional dependencies not found. Please install the 'edgefiltering' extras to use this function: pip install hivclustering[edgefiltering]")
hy_instance = hy.HyphyInterface()

script_path = os.path.realpath(__file__)
Expand Down

0 comments on commit 2327969

Please sign in to comment.