-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
API: silent overflow in Series(bigints, dtype="int8") #40114
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
API: silent overflow in Series(bigints, dtype="int8") #40114
Conversation
So the current behaviour is to wrap around, which follows numpy:
Personally, I think it would be good to be more strict (and only allow safe casting by default) in the constructors, as you are doing in this PR. |
It could, but leaving it until 2.0 will block most remaining simplification of the construction/casting code, which is bound to uncover more bugs. We do explicitly catch OverflowError when passing negative integers and specifying a uint dtype, so there's a precedent for not matching numpy's behavior. |
mothballing to clear the queue |
This is made complicated by a) #40110 and b) MaskedArray behavior, which i need to check but may be changeable.