Skip to content

Commit

Permalink
don't short-circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
topper-123 committed Jan 10, 2023
1 parent d26cb7a commit 880d51f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pandas/core/dtypes/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,7 @@ def maybe_upcast_numeric_to_64bit(arr: NumpyIndexT) -> NumpyIndexT:
ndarray or ExtensionArray
"""
dtype = arr.dtype
if not np.issubclass_(dtype.type, np.number):
return arr
elif is_signed_integer_dtype(dtype) and dtype != np.int64:
if is_signed_integer_dtype(dtype) and dtype != np.int64:
return arr.astype(np.int64)
elif is_unsigned_integer_dtype(dtype) and dtype != np.uint64:
return arr.astype(np.uint64)
Expand Down

0 comments on commit 880d51f

Please sign in to comment.