-
Notifications
You must be signed in to change notification settings - Fork 50
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
Adding casting
argument to astype
(and other casting functions/methods)
#463
Comments
For However, somehow, So when it comes to Surprisingly, am not even certain that a |
Interesting thanks for the context. No strong feelings about the warning in NumPy. Main interest here is ensuring library authors don't run into subtle bugs or at least have easy ways of avoiding them. That said, maybe it is worth thinking about expectations of safe casting. Yeah the use case for |
Trying to look at this from a different angle, I hope. Based on #427 ( cc: @kgryte |
In the specification, we opted to be restrictive in disallowing |
Based on recent discussion, current
astype
behaves as ifcasting
is set"unsafe"
. It may be worthwhile to add this argument as default"unsafe"
while also allowing it to be configured. In particular"safe"
may be of interest to allow users to catch any unexpected or unintended castings in library code. Thiscasting
flag may be useful in other places where castings occur.The text was updated successfully, but these errors were encountered: