Skip to content

Commit 783d264

Browse files
committed
Add test to cover the new handling
1 parent 2ff8669 commit 783d264

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dpnp/tests/test_memory.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ def test_wrong_usm_data(self):
2626

2727
with pytest.raises(TypeError):
2828
dpm.create_data(d)
29+
30+
def test_ndarray_from_data(self):
31+
a = dpnp.empty(5)
32+
b = dpnp.ndarray(a.shape, buffer=a.data)
33+
assert b.data is a.data

0 commit comments

Comments
 (0)