From a6985b54c716b43b17e794adea07620ae553e599 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Fri, 18 Oct 2024 10:18:12 +0200 Subject: [PATCH] remove `clip` --- pyclesperanto/_interroperability.py | 26 +++++++++++++------------- tests/test_clip.py | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pyclesperanto/_interroperability.py b/pyclesperanto/_interroperability.py index 570c1ab0..5e812206 100644 --- a/pyclesperanto/_interroperability.py +++ b/pyclesperanto/_interroperability.py @@ -86,19 +86,19 @@ def set_wait_for_kernel_finish(wait: bool = True): wait_for_kernel_to_finish(wait) -def clip(a, a_min, a_max, out=None): - from ._tier2 import clip - - a = asarray(a) - if out: - out = asarray(out) - return clip( - input_image=a, - output_image=out, - min_intensity=a_min, - max_intensity=a_max, - device=a.device, - ) +# def clip(a, a_min, a_max, out=None): +# from ._tier2 import clip + +# a = asarray(a) +# if out: +# out = asarray(out) +# return clip( +# input_image=a, +# output_image=out, +# min_intensity=a_min, +# max_intensity=a_max, +# device=a.device, +# ) def mod(x1, x2, out=None): diff --git a/tests/test_clip.py b/tests/test_clip.py index 6b05ee09..37f1c333 100644 --- a/tests/test_clip.py +++ b/tests/test_clip.py @@ -9,7 +9,7 @@ def test_clip_min_max(): test = [[0, 1], [2, 3]] reference = [[1, 1], [2, 2]] - result = cle.clip(test, a_min=1, a_max=2) + result = cle.clip(test, min_intensity=1, max_intensity=2) assert np.array_equal(result, reference) @@ -18,7 +18,7 @@ def test_clip_max(): test = [[0, 1], [2, 3]] reference = [[0, 1], [2, 2]] - result = cle.clip(test, a_min=0, a_max=2) + result = cle.clip(test, min_intensity=0, max_intensity=2) assert np.array_equal(result, reference) @@ -27,6 +27,6 @@ def test_clip_min(): test = [[0, 1], [2, 3]] reference = [[1, 1], [2, 3]] - result = cle.clip(test, a_min=1, a_max=3) + result = cle.clip(test, min_intensity=1, max_intensity=3) assert np.array_equal(result, reference)