Skip to content

Commit 9419744

Browse files
author
Daniel Saxton
committed
Check for np.int64
1 parent b14d752 commit 9419744

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/dtypes/cast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ def astype_nansafe(arr, dtype, copy=True, skipna=False):
695695
elif is_datetime64_dtype(arr):
696696
if is_object_dtype(dtype):
697697
return tslib.ints_to_pydatetime(arr.view(np.int64))
698-
elif is_integer_dtype(dtype):
698+
elif dtype == np.int64:
699699
if isna(arr).any():
700700
raise ValueError("Cannot convert NaT values to integer")
701701
return arr.view(dtype)

0 commit comments

Comments
 (0)