Skip to content

Commit

Permalink
Get rid of distutils dependency -- Depend on newer scipy (#346)
Browse files Browse the repository at this point in the history
* Get rid of distutils dependency -- Depend on newer scipy
* Update setup.py
* Update test_core.py
  • Loading branch information
hmaarrfk authored Feb 20, 2024
1 parent 551c1e0 commit d241e7a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions tests/test_dask_image/test_ndfourier/test_core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numbers
from distutils.version import LooseVersion

import pytest
import numpy as np
Expand Down Expand Up @@ -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"]
):
Expand Down
9 changes: 1 addition & 8 deletions tests/test_dask_image/test_ndmeasure/test_core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.version import LooseVersion
import itertools as it
import warnings as wrn

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d241e7a

Please sign in to comment.