diff --git a/dask_image/ndfilters/_threshold.py b/dask_image/ndfilters/_threshold.py index c9133a80..88082db4 100644 --- a/dask_image/ndfilters/_threshold.py +++ b/dask_image/ndfilters/_threshold.py @@ -80,7 +80,7 @@ def threshold_local(image, block_size, method='gaussian', offset=0, mode=mode, cval=cval) elif method == 'gaussian': if param is None: - sigma = (da.asarray(block_size, like=image._meta) - 1) / 6.0 + sigma = (np.array(block_size).astype(float) - 1) / 6.0 else: sigma = param thresh_image = _gaussian.gaussian_filter(image, sigma, mode=mode, diff --git a/tests/test_dask_image/test_ndfilters/test_cupy_threshold.py b/tests/test_dask_image/test_ndfilters/test_cupy_threshold.py index 2793796f..7be79f56 100644 --- a/tests/test_dask_image/test_ndfilters/test_cupy_threshold.py +++ b/tests/test_dask_image/test_ndfilters/test_cupy_threshold.py @@ -10,6 +10,7 @@ cupy = pytest.importorskip("cupy", minversion="5.0.0") +@pytest.mark.cupy @pytest.mark.parametrize('block_size', [ 3, [3, 3],