Fixed potential import error

This commit is contained in:
Vighnesh Birodkar
2014-08-06 22:38:18 +05:30
parent 35c9746b74
commit 9371c4f0e7
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -1,4 +1,8 @@
import networkx as nx
try:
import networkx as nx
except ImportError:
import warnings
warnings.warn('RAGs require networkx')
import numpy as np
from scipy import sparse
from . import _ncut_cy
+1 -1
View File
@@ -2,7 +2,7 @@ try:
import networkx as nx
except ImportError:
import warnings
warnings.warn('"cut_threshold" requires networkx')
warnings.warn('RAGs require networkx')
import numpy as np
from . import _ncut
from . import _ncut_cy