-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
AstypeBugDtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversions
Milestone
Description
from pandas.core.dtypes.cast import astype_nansafe
import numpy as np
arr = np.arange(-3, 3).astype(np.float64)
>>> astype_nansafe(arr, np.dtype(np.uint64))
array([18446744073709551613, 18446744073709551614, 18446744073709551615,
0, 1, 2],
dtype=uint64)
Looks like we don't do anything special here, just call ndarray.astype. I guess we should raise rather than give nonsense results?
Metadata
Metadata
Assignees
Labels
AstypeBugDtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversions