Skip to content

Commit 635dc84

Browse files
Add test based on code from gh-1744
Add test to verify that Python scalars used for min/max which are out of bound for array integral data type get handled as None (no bounds).
1 parent c5e6acb commit 635dc84

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dpctl/tests/test_tensor_clip.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,3 +767,11 @@ def test_clip_readonly_out():
767767

768768
with pytest.raises(ValueError):
769769
dpt.clip(x, out=r)
770+
771+
772+
def test_clip_gh_1744():
773+
get_queue_or_skip()
774+
x = dpt.asarray([0, 255], dtype=dpt.uint8)
775+
y = dpt.clip(x, -300, 300)
776+
777+
assert dpt.all(x == y)

0 commit comments

Comments
 (0)