@@ -240,18 +240,16 @@ cpdef dpnp_DPNPFuncType_to_dtype(size_t type):
240240 utils.checker_throw_type_error(" dpnp_DPNPFuncType_to_dtype" , type )
241241
242242
243- cdef dparray call_fptr_1out(DPNPFuncName fptr_name, result_shape, result_dtype):
243+ cdef dparray call_fptr_1out(DPNPFuncName fptr_name, dparray_shape_type result_shape, result_dtype):
244244
245245 # Convert string type names (dparray.dtype) to C enum DPNPFuncType
246246 cdef DPNPFuncType dtype_in = dpnp_dtype_to_DPNPFuncType(result_dtype)
247247
248248 # get the FPTR data structure
249249 cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(fptr_name, dtype_in, dtype_in)
250250
251- result_type = dpnp_DPNPFuncType_to_dtype(< size_t > kernel_data.return_type)
252-
253251 # Create result array with type given by FPTR data
254- cdef dparray result = dparray (result_shape, dtype = result_type )
252+ cdef dparray result = utils.create_output_array (result_shape, kernel_data.return_type, None )
255253
256254 cdef fptr_1out_t func = < fptr_1out_t > kernel_data.ptr
257255 # Call FPTR function
@@ -268,9 +266,8 @@ cdef dparray call_fptr_1in_1out(DPNPFuncName fptr_name, dparray x1, dparray_shap
268266 """ get the FPTR data structure """
269267 cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(fptr_name, param1_type, param1_type)
270268
271- result_type = dpnp_DPNPFuncType_to_dtype( < size_t > kernel_data.return_type)
272269 """ Create result array with type given by FPTR data """
273- cdef dparray result = dparray (result_shape, dtype = result_type )
270+ cdef dparray result = utils.create_output_array (result_shape, kernel_data.return_type, None )
274271
275272 cdef fptr_1in_1out_t func = < fptr_1in_1out_t > kernel_data.ptr
276273 """ Call FPTR function """
0 commit comments