Skip to content

Commit d60d58e

Browse files
Added tests for type promotion in tensor.allclose
1 parent b121d67 commit d60d58e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dpctl/tests/test_tensor_testing.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,12 @@ def test_allclose_validation():
8484
x = dpt.asarray(True)
8585
with pytest.raises(TypeError):
8686
dpt.allclose(x, False)
87+
88+
89+
def test_all_close_promotion():
90+
get_queue_or_skip()
91+
92+
x1 = dpt.ones(10, dtype="i4")
93+
x2 = dpt.ones(10, dtype="i8")
94+
95+
assert dpt.allclose(x1, x2)

0 commit comments

Comments
 (0)