Skip to content

Commit

Permalink
feedback: add assert to maybe_castable
Browse files Browse the repository at this point in the history
  • Loading branch information
arw2019 committed Oct 11, 2020
1 parent 6768396 commit cb90e32
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pandas/core/dtypes/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,8 @@ def convert_dtypes(
def maybe_castable(arr: np.ndarray) -> bool:
# return False to force a non-fastpath

assert isinstance(arr, np.ndarray) # GH 37024

# check datetime64[ns]/timedelta64[ns] are valid
# otherwise try to coerce
kind = arr.dtype.kind
Expand Down

0 comments on commit cb90e32

Please sign in to comment.