[Numpy-discussion] Re: NEP 50 and cast safety for scalar assignment/conversions

2022-10-22 Thread Sebastian Berg
On Fri, 2022-10-21 at 17:17 -0600, Aaron Meurer wrote: > I'm probably not understanding all the subtleties here. In the > documentation for can_cast (and other places), it says, "'safe' means > only casts which can preserve values are allowed." So by that > definition, I think 'safe' casting should

[Numpy-discussion] Re: NEP 50 and cast safety for scalar assignment/conversions

2022-10-21 Thread Aaron Meurer
I'm probably not understanding all the subtleties here. In the documentation for can_cast (and other places), it says, "'safe' means only casts which can preserve values are allowed." So by that definition, I think 'safe' casting should disallow 5000 to be cast to int8, because it would not preserv