File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -286,24 +286,21 @@ cdef tuple get_shape_dtype(object input_obj):
286
286
287
287
288
288
cpdef find_common_type(object x1_obj, object x2_obj):
289
- cdef bint x1_obj_is_dparray = isinstance (x1_obj, dparray)
290
- cdef bint x2_obj_is_dparray = isinstance (x2_obj, dparray)
291
-
292
289
_, x1_dtype = get_shape_dtype(x1_obj)
293
290
_, x2_dtype = get_shape_dtype(x2_obj)
294
291
295
292
cdef list array_types = []
296
293
cdef list scalar_types = []
297
294
298
- if x1_obj_is_dparray:
299
- array_types.append(x1_dtype)
300
- else :
295
+ if dpnp.isscalar(x1_obj):
301
296
scalar_types.append(x1_dtype)
302
-
303
- if x2_obj_is_dparray:
304
- array_types.append(x2_dtype)
305
297
else :
298
+ array_types.append(x1_dtype)
299
+
300
+ if dpnp.isscalar(x2_obj):
306
301
scalar_types.append(x2_dtype)
302
+ else :
303
+ array_types.append(x2_dtype)
307
304
308
305
return numpy.find_common_type(array_types, scalar_types)
309
306
You can’t perform that action at this time.
0 commit comments