Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement usm_ndarray.__arrray__ method
The property raises TypeError informing user that implicit conversions from usm_ndarray to numpy.ndarray are not permitted. Explicit conversion using `dpctl.tensor.asnumpy` is advised. Disallowing implicit conversion prevents `np.asarray(usm_ar)` from creating an array of 0D usm_ndarray instances, because using it is very costly due to multitude of short-array transfers from GPU to host.
- Loading branch information