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 d827e34 commit 3110e87Copy full SHA for 3110e87
pandas/_libs/lib.pyx
@@ -1038,8 +1038,8 @@ cdef inline bint c_is_list_like(object obj, bint allow_sets) except -1:
1038
isinstance(obj, abc.Iterable)
1039
# we do not count strings/unicode/bytes as list-like
1040
and not isinstance(obj, (str, bytes))
1041
- # exclude zero-dimensional numpy arrays, effectively scalars
1042
- and not (util.is_array(obj) and obj.ndim == 0)
+ # exclude zero-dimensional duck arrays, effectively scalars
+ and not (hasattr(obj, "ndim") and obj.ndim == 0)
1043
# exclude sets if allow_sets is False
1044
and not (allow_sets is False and isinstance(obj, abc.Set))
1045
)
0 commit comments