Closed
Description
Description
dpnp.array returns the same object, it is expected that it will return wrapped dpnp.ndarray
with the same sycl_usm_arrray_interface.
>>> import dpctl
>>> import dpctl.tensor as dpt
>>> import dpnp
>>> dpctl_arr = dpctl.tensor.zeros(12, usm_type="device", sycl_queue=dpctl.SyclQueue("gpu"))
>>> dpctl_arr
usm_ndarray([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
>>> result = dpnp.array(dpctl_arr, copy=False)
>>> result
usm_ndarray([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
>>> type(result)
<class 'dpctl.tensor._usmarray.usm_ndarray'>
Env
Python 3.10.13
conda list | grep dp
dpctl 0.15.0rc2
dpnp 0.13.0rc2
mkl-dpcpp 2024.0.0
Metadata
Metadata
Assignees
Labels
No labels