From a24adc9a2721f566d6d87e2db1f8682e6822a9ae Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Mon, 27 Nov 2023 15:16:11 -0500 Subject: [PATCH 1/3] Get rid of distutils dependency -- Depend on newer scipy --- tests/test_dask_image/test_ndmeasure/test_core.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/test_dask_image/test_ndmeasure/test_core.py b/tests/test_dask_image/test_ndmeasure/test_core.py index 57add8cf..f7b8b299 100644 --- a/tests/test_dask_image/test_ndmeasure/test_core.py +++ b/tests/test_dask_image/test_ndmeasure/test_core.py @@ -1,6 +1,5 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from distutils.version import LooseVersion import itertools as it import warnings as wrn @@ -107,13 +106,7 @@ def test_center_of_mass(datatype): ] ) def test_measure_props(funcname, shape, chunks, has_lbls, ind): - # early scipy version uses a different name sum insted of sum_labels. - if funcname == 'sum_labels' and scipy.__version__ < LooseVersion('1.6.0'): - scipy_funcname = 'sum' - else: - scipy_funcname = funcname - - sp_func = getattr(scipy.ndimage, scipy_funcname) + sp_func = getattr(scipy.ndimage, funcname) da_func = getattr(dask_image.ndmeasure, funcname) a = np.random.random(shape) From a5b9e58368d65590b0ea663cfd125e69dad35cba Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Mon, 27 Nov 2023 16:36:13 -0500 Subject: [PATCH 2/3] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index eae610b4..1b8cf830 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ def run_tests(self): "dask[array] >=2023.2.0", "dask[dataframe] >=2023.2.0", "numpy >=1.18", - "scipy >=0.19.1", + "scipy >=1.7.0", "pims >=0.4.1", "tifffile >=2018.10.18", "pandas >=2.0.0", From eb04872db0949078505175680c72ac9af8ffece1 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Mon, 27 Nov 2023 16:53:30 -0500 Subject: [PATCH 3/3] Update test_core.py --- tests/test_dask_image/test_ndfourier/test_core.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_dask_image/test_ndfourier/test_core.py b/tests/test_dask_image/test_ndfourier/test_core.py index 6d743570..f457533b 100644 --- a/tests/test_dask_image/test_ndfourier/test_core.py +++ b/tests/test_dask_image/test_ndfourier/test_core.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- import numbers -from distutils.version import LooseVersion import pytest import numpy as np @@ -92,7 +91,6 @@ def test_fourier_filter_identity(funcname, s): ) def test_fourier_filter_type(funcname, upcast_type, dtype): if ( - LooseVersion(sp.__version__) >= "1.0.0" and dtype in [np.int64, np.float64] and funcname in ["fourier_gaussian", "fourier_uniform"] ):