Skip to content

Commit aee48c9

Browse files
committed
ravel instead of flatten
1 parent d1548b0 commit aee48c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/dtypes/cast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,7 @@ def np_can_hold_element(dtype: np.dtype, element: Any) -> Any:
19191919
return element
19201920
# GH 57338
19211921
# Check boolean array set as object type
1922-
comp = [lib.is_bool(e) for e in np.array([element]).flatten()]
1922+
comp = [lib.is_bool(e) for e in np.array([element]).ravel()]
19231923
if all(comp):
19241924
return element.astype("bool")
19251925
raise LossySetitemError

0 commit comments

Comments
 (0)