[Numpy-discussion] Change in scalar upcasting rules for 1.6.x?
Tue Feb 14 01:22:30 CST 2012
> You might be right, Chuck. I would like to investigate more, however.
> What I fear is that there are *a lot* of users still on NumPy 1.3 and NumPy 1.5. The fact that we haven't heard any complaints, yet, does not mean to me that we aren't creating headache for people later who have just not had time to try things.
> However, I can believe that the specifics of "minor" casting rules are probably not relied upon by a lot of codes out there. Still, as Robert Kern often reminds us well --- our intuitions about this are usually not worth much.
> I may be making more of this then it's worth, I realize. I was just sensitive to it at the time things were changing (even though I didn't have time to be vocal), and now hearing this users experience, it confirms my bias... Believe me, I do not want to "revert" if at all possible. There is plenty of more work to do, and I'm very much in favor of the spirit of the work Mark was and is doing.
> I think writing tests would be more productive. The current coverage is skimpy in that we typically don't cover *all* the combinations. Sometimes we don't cover any of them ;) I know you are sensitive to the typecasting, it was one of your babies. Nevertheless, I don't think it is that big an issue at the moment. If you can think of ways to *improve* it I think everyone will be interested in that.
First of all, I would hardly call it one of my babies. I care far more for my actual babies than for this. It was certainly one of my headaches that I had to deal with and write code for (and take into account previous behavior with). I certainly spent a lot of time wrestling with type-coercion and integrating numerous opinions as quickly as I could with it --- even in Numeric with the funny down_casting arrays. At best the resulting system was a compromise (with an implementation that you could reason about with the right perspective despite claims to the contrary).
This discussion is not about me being sensitive because I wrote some code or had a hand in a design that needed changing. I hope we replace all the code I've written with something better. I expect that eventually. This just has to be done in an appropriate way. I'm sensitive because I understand where the previous code came from and *why it was written* and am concerned about changing things out from under users in ways that are subtle.
I continue to affirm that breaking ABI compatibility is much preferable to changing type-casting behavior. I know people disagree with me. But, distributions help solve the "ABI compatibility problem", but nothing solves required code changes due to subtle type-casting issues. I would just expect this sort of change at NumPy 2.0. We could have waited for half-float until then.
I will send the result of my analysis shortly on what changed between 1.5.1 and 1.6.1
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion