Skip to content

Commit

Permalink
Minor fixes for NumPy 2.0 compatiblity (rapidsai#746)
Browse files Browse the repository at this point in the history
This MR resolves issues 3 and 4 reported [here](rapidsai#742 (comment)) when testing with NumPy 2.0 and CuPy 13.2 locally (issues 1 and 2 will be addressed in CuPy itself)
rapidsai#742 (comment)

For now, leave NumPy pinning as-is. Tests should continue to pass with NumPy 1.x

Authors:
  - Gregory Lee (https://github.com/grlee77)

Approvers:
  - https://github.com/jakirkham

URL: rapidsai#746
  • Loading branch information
grlee77 committed Jul 11, 2024
1 parent fbca7fa commit 540e96e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions python/cucim/src/cucim/skimage/segmentation/_chan_vese.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ def chan_vese(
energies = []
phivar = tol + 1

dt = cp.asarray(dt, dtype=float_dtype)
while phivar > tol and i < max_num_iter:
# Save old level set values
oldphi = phi
Expand Down
2 changes: 1 addition & 1 deletion python/cucim/tests/unit/core/test_stain_normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def test_result_value(self, image, expected):
stain_extraction_pca(image)
else:
result = stain_extraction_pca(image)
cp.testing.assert_allclose(result, expected)
cp.testing.assert_allclose(result, expected, rtol=1e-6)


class TestStainNormalizerMacenko:
Expand Down

0 comments on commit 540e96e

Please sign in to comment.