Skip to content

Commit 3322fe2

Browse files
committed
Revert change because it broke tests
I'm not completely sure why, but reverting here for simplicity
1 parent 355dfff commit 3322fe2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/_libs/lib.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ cdef inline bint c_is_list_like(object obj, bint allow_sets) except -1:
10391039
# we do not count strings/unicode/bytes as list-like
10401040
and not isinstance(obj, (str, bytes))
10411041
# exclude zero-dimensional duck arrays, effectively scalars
1042-
and getattr(obj, "ndim", 0) != 0
1042+
and not (hasattr(obj, "ndim") and obj.ndim == 0)
10431043
# exclude sets if allow_sets is False
10441044
and not (allow_sets is False and isinstance(obj, abc.Set))
10451045
)

0 commit comments

Comments
 (0)