Skip to content

Commit cb90e32

Browse files
committed
feedback: add assert to maybe_castable
1 parent 6768396 commit cb90e32

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/dtypes/cast.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,8 @@ def convert_dtypes(
12861286
def maybe_castable(arr: np.ndarray) -> bool:
12871287
# return False to force a non-fastpath
12881288

1289+
assert isinstance(arr, np.ndarray) # GH 37024
1290+
12891291
# check datetime64[ns]/timedelta64[ns] are valid
12901292
# otherwise try to coerce
12911293
kind = arr.dtype.kind

0 commit comments

Comments
 (0)