Skip to content

Commit

Permalink
fix import for old scipy
Browse files Browse the repository at this point in the history
  • Loading branch information
Anihilatorgunn committed Nov 17, 2024
1 parent 2faa7af commit b169344
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions imops/morphology.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
from scipy.ndimage import distance_transform_edt as scipy_distance_transform_edt, generate_binary_structure
from scipy.ndimage._nd_image import euclidean_feature_transform
from scipy.spatial import ConvexHull, QhullError


try:
from scipy.spatial import QhullError
except ImportError:
from scipy.spatial.qhull import QhullError # Old scipy has another structure

from skimage.morphology import (
binary_closing as scipy_binary_closing,
binary_dilation as scipy_binary_dilation,
Expand Down

0 comments on commit b169344

Please sign in to comment.