Skip to content

Commit 8bdf206

Browse files
Add test based on reproducer in gh-1926
1 parent 5542324 commit 8bdf206

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

dpctl/tests/test_usm_ndarray_ctor.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,6 +1435,17 @@ def test_astype_device():
14351435
assert r.sycl_queue == q2
14361436

14371437

1438+
def test_astype_gh_1926():
1439+
get_queue_or_skip()
1440+
1441+
x = dpt.ones(10_000)
1442+
x_ = dpt.astype(x, x.dtype, copy=False, order="C")
1443+
assert x is x_
1444+
1445+
x__ = dpt.astype(x, x.dtype, copy=False, order="F")
1446+
assert x is x__
1447+
1448+
14381449
def test_copy():
14391450
try:
14401451
X = dpt.usm_ndarray((5, 5), "i4")[2:4, 1:4]

0 commit comments

Comments
 (0)