mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-03 13:11:25 +08:00
Fixed potential import error
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user