File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 5
5
6
6
from ._copy_utils import _empty_like_orderK
7
7
from ._ctors import empty
8
- from ._data_types import int32 , int64
9
8
from ._tensor_impl import _copy_usm_ndarray_into_usm_ndarray as ti_copy
10
9
from ._tensor_impl import _take as ti_take
10
+ from ._tensor_impl import (
11
+ default_device_index_type as ti_default_device_index_type ,
12
+ )
11
13
from ._tensor_sorting_impl import _searchsorted_left , _searchsorted_right
12
- from ._type_utils import iinfo , isdtype , result_type
14
+ from ._type_utils import isdtype , result_type
13
15
from ._usmarray import usm_ndarray
14
16
15
17
@@ -141,9 +143,9 @@ def searchsorted(
141
143
x2 = x2_buf
142
144
143
145
dst_usm_type = du .get_coerced_usm_type ([x1 .usm_type , x2 .usm_type ])
144
- dst_dt = int32 if x2 . size <= iinfo ( int32 ). max else int64
146
+ index_dt = ti_default_device_index_type ( q )
145
147
146
- dst = _empty_like_orderK (x2 , dst_dt , usm_type = dst_usm_type )
148
+ dst = _empty_like_orderK (x2 , index_dt , usm_type = dst_usm_type )
147
149
148
150
if side == "left" :
149
151
ht_ev , _ = _searchsorted_left (
You can’t perform that action at this time.
0 commit comments