diff --git a/imops/morphology.py b/imops/morphology.py index 84bb4665..bd087847 100644 --- a/imops/morphology.py +++ b/imops/morphology.py @@ -5,7 +5,13 @@ from edt import edt 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.ndimage.morphology import _ni_support + + +try: + from scipy.ndimage._morphology import _ni_support +except ImportError: + from scipy.ndimage.morphology import _ni_support + from skimage.morphology import ( binary_closing as scipy_binary_closing, binary_dilation as scipy_binary_dilation,