Skip to content

Commit e04b2bf

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

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
@@ -995,7 +995,7 @@ cdef inline bint c_is_list_like(object obj, bint allow_sets) except -1:
995995
# we do not count strings/unicode/bytes as list-like
996996
and not isinstance(obj, (str, bytes))
997997
# exclude zero-dimensional duck arrays, effectively scalars
998-
and getattr(obj, "ndim", 0) != 0
998+
and not (hasattr(obj, "ndim") and obj.ndim == 0)
999999
# exclude sets if allow_sets is False
10001000
and not (allow_sets is False and isinstance(obj, abc.Set))
10011001
)

0 commit comments

Comments
 (0)