@@ -50,18 +50,17 @@ cpdef utils.dpnp_descriptor dpnp_argsort(utils.dpnp_descriptor x1):
50
50
return call_fptr_1in_1out(DPNP_FN_ARGSORT, x1, x1.shape)
51
51
52
52
53
- cpdef dparray dpnp_partition(utils.dpnp_descriptor arr, int kth, axis = - 1 , kind = ' introselect' , order = None ):
53
+ cpdef utils.dpnp_descriptor dpnp_partition(utils.dpnp_descriptor arr, int kth, axis = - 1 , kind = ' introselect' , order = None ):
54
54
cdef shape_type_c shape1 = arr.shape
55
55
56
56
cdef size_t kth_ = kth if kth >= 0 else (arr.ndim + kth)
57
57
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(arr.dtype)
58
58
59
59
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_PARTITION, param1_type, param1_type)
60
60
61
- result_type = dpnp_DPNPFuncType_to_dtype( < size_t > kernel_data.return_type)
62
61
cdef utils.dpnp_descriptor arr2 = dpnp_copy(arr)
63
62
64
- cdef dparray result = dparray (arr.shape, dtype = result_type )
63
+ cdef utils.dpnp_descriptor result = utils.create_output_descriptor (arr.shape, kernel_data.return_type, None )
65
64
66
65
cdef fptr_dpnp_partition_t func = < fptr_dpnp_partition_t > kernel_data.ptr
67
66
@@ -70,7 +69,7 @@ cpdef dparray dpnp_partition(utils.dpnp_descriptor arr, int kth, axis=-1, kind='
70
69
return result
71
70
72
71
73
- cpdef dparray dpnp_searchsorted(utils.dpnp_descriptor arr, utils.dpnp_descriptor v, side = ' left' ):
72
+ cpdef utils.dpnp_descriptor dpnp_searchsorted(utils.dpnp_descriptor arr, utils.dpnp_descriptor v, side = ' left' ):
74
73
if side is ' left' :
75
74
side_ = True
76
75
else :
@@ -80,7 +79,7 @@ cpdef dparray dpnp_searchsorted(utils.dpnp_descriptor arr, utils.dpnp_descriptor
80
79
81
80
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_SEARCHSORTED, param1_type, param1_type)
82
81
83
- cdef dparray result = dparray (v.shape, dtype = dpnp.int64)
82
+ cdef utils.dpnp_descriptor result = utils_py.create_output_descriptor_py (v.shape, dpnp.int64, None )
84
83
85
84
cdef fptr_dpnp_searchsorted_t func = < fptr_dpnp_searchsorted_t > kernel_data.ptr
86
85
0 commit comments