Skip to content

Commit 77df63f

Browse files
_object_to_tuple: wrap in tuple any input scalar (#512)
1 parent eec6dc7 commit 77df63f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpnp/dpnp_utils/dpnp_algo_utils.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ cpdef inline tuple _object_to_tuple(object obj):
304304
if cpython.PySequence_Check(obj):
305305
return tuple(obj)
306306

307-
if isinstance(obj, int):
308-
return obj,
307+
if dpnp.isscalar(obj):
308+
return (obj, )
309309

310310
raise ValueError("DPNP object_to_tuple(): 'obj' should be 'None', collections.abc.Sequence, or 'int'")
311311

0 commit comments

Comments
 (0)