Skip to content

Commit

Permalink
Added missing cupy test mark and fixed cupy threshold (#329)
Browse files Browse the repository at this point in the history
* Added missing cupy test mark

* threshold_local: ensure sigma argument is passed as numpy array
  • Loading branch information
m-albert authored Aug 2, 2023
1 parent fba6645 commit 264bd1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dask_image/ndfilters/_threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
cupy = pytest.importorskip("cupy", minversion="5.0.0")


@pytest.mark.cupy
@pytest.mark.parametrize('block_size', [
3,
[3, 3],
Expand Down

0 comments on commit 264bd1d

Please sign in to comment.