Skip to content

Commit ae54d5c

Browse files
authored
make get_shape_dtype() type independent (#882)
1 parent 913e8be commit ae54d5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dpnp/dpnp_utils/dpnp_algo_utils.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ cdef tuple get_shape_dtype(object input_obj):
260260
return_dtype = None
261261

262262
# TODO replace with checking "shape" and "dtype" attributes
263-
if issubclass(type(input_obj), (numpy.ndarray, dparray)):
263+
if hasattr(input_obj, "shape") and hasattr(input_obj, "dtype"):
264264
return (input_obj.shape, input_obj.dtype)
265265

266266
cdef shape_type_c elem_shape

0 commit comments

Comments
 (0)