From df80d16ba68ab31e6330ef3823d471b5275e6401 Mon Sep 17 00:00:00 2001 From: John Walsh Date: Thu, 23 Jul 2026 14:41:51 -0400 Subject: [PATCH] fix scipy deprecation warnings --- ifcb_features/all.py | 2 +- ifcb_features/blobs.py | 6 +++--- ifcb_features/segmentation.py | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ifcb_features/all.py b/ifcb_features/all.py index 62aaa9f..09e1f14 100644 --- a/ifcb_features/all.py +++ b/ifcb_features/all.py @@ -1,6 +1,6 @@ import numpy as np -from scipy.ndimage.measurements import find_objects +from scipy.ndimage import find_objects from scipy.spatial import QhullError from skimage.measure import label, regionprops diff --git a/ifcb_features/blobs.py b/ifcb_features/blobs.py index b3390aa..98fc67a 100644 --- a/ifcb_features/blobs.py +++ b/ifcb_features/blobs.py @@ -1,13 +1,13 @@ import numpy as np -from scipy.ndimage import measurements +from scipy.ndimage import find_objects, label from .morphology import SE2, SE3, EIGHT, bwmorph_thin def label_blobs(B): B = np.array(B).astype(bool) - labeled, _ = measurements.label(B,structure=EIGHT) - objects = measurements.find_objects(labeled) + labeled, _ = label(B, structure=EIGHT) + objects = find_objects(labeled) return labeled, objects def find_blobs(B): diff --git a/ifcb_features/segmentation.py b/ifcb_features/segmentation.py index 413019c..f777da7 100644 --- a/ifcb_features/segmentation.py +++ b/ifcb_features/segmentation.py @@ -1,7 +1,6 @@ import numpy as np -from scipy.ndimage import label -from scipy.ndimage.morphology import binary_fill_holes +from scipy.ndimage import binary_fill_holes, label from skimage.morphology import closing, dilation, erosion, diamond import skimage.filters as imfilters