-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: overflow-safe astype for datetime64/timedelta64 unit conversion #16352
Comments
No, we should raise it. It is a bit clumsy to raise errors from within the casting machinery currently, I think that is pretty much the only reason... EDIT: There could be a point of just returning NaT, although not really better IMO. |
No idea how to be helpful on that front, but here are links to the relevant pandas code that may be upstream-able: https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/tslibs/conversion.pyx#L155 |
In addition to astype, it'd be nice if addition/subtraction were overflow-safe
|
Just implemented a version of this in pandas-dev/pandas#46478 that I'm hoping we can upstream to numpy somehow. |
Is there a compelling reason numpy doesnt do this?
The text was updated successfully, but these errors were encountered: