Skip to content

Commit

Permalink
Merge branch 'branch-23.08' into cuda-12
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham authored Jun 28, 2023
2 parents 03acaa9 + 632881c commit 2941d79
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions python/cucim/src/cucim/skimage/feature/_canny.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ def _nonmaximum_suppression_bilinear(
kernel = _get_nonmax_kernel(large_int=large_int)

out = cp.empty_like(magnitude)

if isinstance(low_threshold, cp.ndarray):
# if array scalar was provided, make sure dtype matches other arrays
if low_threshold.ndim > 0:
raise ValueError("expected scalar low_treshold")
low_threshold = float(low_threshold)

kernel(isobel, jsobel, magnitude, eroded_mask, low_threshold, out)
return out

Expand Down
4 changes: 2 additions & 2 deletions python/cucim/src/cucim/skimage/filters/_fft_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ def butterworth(
elif npad > 0:
center_slice = tuple(slice(npad, s + npad) for s in image.shape)
image = pad(image, npad, mode='edge')
fft_shape = (image.shape if channel_axis is None
else np.delete(image.shape, channel_axis))
fft_shape = tuple(image.shape if channel_axis is None
else np.delete(image.shape, channel_axis))
is_real = cp.isrealobj(image)
float_dtype = _supported_float_type(image.dtype, allow_complex=True)
image = image.astype(float_dtype, copy=False)
Expand Down

0 comments on commit 2941d79

Please sign in to comment.