Skip to content

Commit 50f9a20

Browse files
committed
specify bug
1 parent f431efc commit 50f9a20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pandas/core/dtypes/cast.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,6 +1919,7 @@ def np_can_hold_element(dtype: np.dtype, element: Any) -> Any:
19191919
raise LossySetitemError
19201920
return element
19211921
# GH 57338
1922+
# Check boolean array set as object type
19221923
with np.errstate(invalid="ignore"):
19231924
casted = element.astype(dtype)
19241925
comp = casted == element

0 commit comments

Comments
 (0)