We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57e186b commit 590c2a2Copy full SHA for 590c2a2
pandas/_libs/lib.pyx
@@ -1047,8 +1047,8 @@ cdef inline bint c_is_list_like(object obj, bint allow_sets) except -1:
1047
isinstance(obj, abc.Iterable)
1048
# we do not count strings/unicode/bytes as list-like
1049
and not isinstance(obj, (str, bytes))
1050
- # exclude zero-dimensional duck arrays, effectively scalars
1051
- and not (hasattr(obj, "ndim") and obj.ndim == 0)
+ # assume not a 0d array unless there's evidence otherwise
+ and getattr(obj, "ndim", 1) != 0
1052
# exclude sets if allow_sets is False
1053
and not (allow_sets is False and isinstance(obj, abc.Set))
1054
)
0 commit comments