Skip to content

Commit 07d3929

Browse files
committed
feedback: add assert to maybe_castable
1 parent 5324a05 commit 07d3929

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
@@ -1289,6 +1289,8 @@ def convert_dtypes(
12891289
def maybe_castable(arr: np.ndarray) -> bool:
12901290
# return False to force a non-fastpath
12911291

1292+
assert isinstance(arr, np.ndarray) # GH 37024
1293+
12921294
# check datetime64[ns]/timedelta64[ns] are valid
12931295
# otherwise try to coerce
12941296
kind = arr.dtype.kind

0 commit comments

Comments
 (0)