Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion doc/reference/dtype.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Data type testing
dpnp.issubdtype
dpnp.issubsctype
dpnp.issubclass_
dpnp.find_common_type

Miscellaneous
-------------
Expand Down
6 changes: 0 additions & 6 deletions dpnp/dpnp_utils/dpnp_algo_utils.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ Returns a tuple of:
2. dtype
"""

cpdef find_common_type(object x1_obj, object x2_obj)
"""
Find common type of 2 input objects
"""


cpdef long _get_linear_index(key, tuple shape, int ndim)
"""
Compute linear index of an element in memory from array indices
Expand Down
20 changes: 0 additions & 20 deletions dpnp/dpnp_utils/dpnp_algo_utils.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -432,26 +432,6 @@ cdef tuple get_shape_dtype(object input_obj):
return (return_shape, dpnp.dtype(type(input_obj)))


cpdef find_common_type(object x1_obj, object x2_obj):
_, x1_dtype = get_shape_dtype(x1_obj)
_, x2_dtype = get_shape_dtype(x2_obj)

cdef list array_types = []
cdef list scalar_types = []

if dpnp.isscalar(x1_obj):
scalar_types.append(x1_dtype)
else:
array_types.append(x1_dtype)

if dpnp.isscalar(x2_obj):
scalar_types.append(x2_dtype)
else:
array_types.append(x2_dtype)

return numpy.find_common_type(array_types, scalar_types)


cdef shape_type_c get_common_shape(shape_type_c input1_shape, shape_type_c input2_shape) except *:
cdef shape_type_c input1_shape_orig = input1_shape
cdef shape_type_c input2_shape_orig = input2_shape
Expand Down