Skip to content

Commit b7b9bcf

Browse files
asarray on numpy arrays should take device capabilities into account in decision in data-type of the USM array
1 parent 8fc2a84 commit b7b9bcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dpctl/tensor/_ctors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _asarray_from_numpy_ndarray(
197197
if usm_type is None:
198198
usm_type = "device"
199199
if dtype is None:
200-
dtype = ary.dtype
200+
dtype = _get_dtype(dtype, sycl_queue, ref_type=ary.dtype)
201201
copy_q = normalize_queue_device(sycl_queue=None, device=sycl_queue)
202202
f_contig = ary.flags["F"]
203203
c_contig = ary.flags["C"]

0 commit comments

Comments
 (0)