Skip to content

Commit 02293ef

Browse files
Corrected test_can_cast, test_result_type
1 parent 300124a commit 02293ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dpctl/tests/test_usm_ndarray_manipulation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -922,10 +922,10 @@ def test_can_cast():
922922
q = get_queue_or_skip()
923923

924924
# incorrect input
925-
X = dpt.ones((2, 2), dtype=dpt.int64, sycl_queue=q)
925+
X = dpt.ones((2, 2), dtype=dpt.int16, sycl_queue=q)
926926
pytest.raises(TypeError, dpt.can_cast, X, 1)
927927
pytest.raises(TypeError, dpt.can_cast, X, X)
928-
X_np = np.ones((2, 2), dtype=np.int64)
928+
X_np = np.ones((2, 2), dtype=np.int16)
929929

930930
assert dpt.can_cast(X, "float32") == np.can_cast(X_np, "float32")
931931
assert dpt.can_cast(X, dpt.int32) == np.can_cast(X_np, np.int32)
@@ -935,8 +935,8 @@ def test_can_cast():
935935
def test_result_type():
936936
q = get_queue_or_skip()
937937

938-
X = [dpt.ones((2), dtype=dpt.int64, sycl_queue=q), dpt.int32, "float16"]
939-
X_np = [np.ones((2), dtype=np.int64), np.int32, "float16"]
938+
X = [dpt.ones((2), dtype=dpt.int16, sycl_queue=q), dpt.int32, "int64"]
939+
X_np = [np.ones((2), dtype=np.int16), np.int32, "int64"]
940940

941941
assert dpt.result_type(*X) == np.result_type(*X_np)
942942

0 commit comments

Comments
 (0)