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 d1548b0 commit aee48c9Copy full SHA for aee48c9
pandas/core/dtypes/cast.py
@@ -1919,7 +1919,7 @@ def np_can_hold_element(dtype: np.dtype, element: Any) -> Any:
1919
return element
1920
# GH 57338
1921
# Check boolean array set as object type
1922
- comp = [lib.is_bool(e) for e in np.array([element]).flatten()]
+ comp = [lib.is_bool(e) for e in np.array([element]).ravel()]
1923
if all(comp):
1924
return element.astype("bool")
1925
raise LossySetitemError
0 commit comments