From 688f4be54a2cf0f21dce34d85f0edb23fa1ae46f Mon Sep 17 00:00:00 2001 From: Philipenko Vladimir Date: Tue, 4 Jun 2024 15:23:15 +0300 Subject: [PATCH] :crutch: --- imops/morphology.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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,