Skip to content

Commit 717519c

Browse files
Added test for usm_ndarray properties
1 parent dedab4e commit 717519c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

dpctl/tests/test_usm_ndarray_ctor.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,19 @@ def test_ctor_buffer_kwarg():
269269
)
270270
with pytest.raises(ValueError):
271271
dpt.usm_ndarray(10, buffer=dict())
272+
273+
274+
def test_usm_ndarray_props():
275+
Xusm = dpt.usm_ndarray((10, 5), dtype="c16", order="F")
276+
Xusm.ndim
277+
repr(Xusm)
278+
Xusm.flags
279+
Xusm.__sycl_usm_array_interface__
280+
Xusm.device
281+
Xusm.real
282+
Xusm.imag
283+
try:
284+
dpctl.SyclQueue("cpu")
285+
except dpctl.SyclQueueCreationError:
286+
pytest.skip("Sycl device CPU was not detected")
287+
Xusm.to_device("cpu")

0 commit comments

Comments
 (0)