Skip to content

Commit

Permalink
Add test based on code from gh-1744
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
oleksandr-pavlyk committed Jul 25, 2024
1 parent c5e6acb commit 635dc84
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dpctl/tests/test_tensor_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,3 +767,11 @@ def test_clip_readonly_out():

with pytest.raises(ValueError):
dpt.clip(x, out=r)


def test_clip_gh_1744():
get_queue_or_skip()
x = dpt.asarray([0, 255], dtype=dpt.uint8)
y = dpt.clip(x, -300, 300)

assert dpt.all(x == y)

0 comments on commit 635dc84

Please sign in to comment.