Skip to content

Commit

Permalink
always use float64 dtype within pdist_max_blockwise
Browse files Browse the repository at this point in the history
  • Loading branch information
grlee77 committed Mar 3, 2025
1 parent f73f779 commit 9901ad4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/cucim/src/cucim/skimage/_shared/distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ def pdist_max_blockwise(
)

blocks_per_dim = math.ceil(num_coords / coords_per_block)
if coords.dtype not in [xp.float32, xp.float64]:
coords = coords.astype(xp.float32, copy=False)
coords = coords.astype(xp.float64, copy=False)
if blocks_per_dim > 1:
# reuse the same temporary storage array for most blocks
# (last block in row and column may be smaller)
Expand Down

0 comments on commit 9901ad4

Please sign in to comment.