Skip to content

Commit bf22a28

Browse files
dpt.nonzero should use default index type
Closes gh-1335. The issue was caused by nonzero using default integral data type, not default index data type.
1 parent e28bd88 commit bf22a28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dpctl/tensor/_copy_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def _nonzero_impl(ary):
586586
mask_nelems, dtype=cumsum_dt, sycl_queue=exec_q, order="C"
587587
)
588588
mask_count = ti.mask_positions(ary, cumsum, sycl_queue=exec_q)
589-
indexes_dt = ti.default_device_int_type(exec_q.sycl_device)
589+
indexes_dt = ti.default_device_index_type(exec_q.sycl_device)
590590
indexes = dpt.empty(
591591
(ary.ndim, mask_count),
592592
dtype=indexes_dt,

0 commit comments

Comments
 (0)