News for hackers. Stuff that matters.
Re:The NumPy array: a structure for efficient numerical comp... by ludamad on Monday August 01, 2016 @01:12AM (#12200313)
http://doc.pypy.org/en/latest/release-1.8.0.html It does this since 1.8 it seems (mentioned under 'list specialization'). Probably 'type inference' isn't the right way to describe it. It will optimistically assume it's a homogeneous array and will have to recreate this array if the assumption is broken. This will be useful in the vast majority of cases, as mixed type arrays are not usually used in performance-sensitive code.
Re:The NumPy array: a structure for efficient numerical comp... by rlayton2 on Monday August 01, 2016 @01:25AM (#12200354)
Further, there is almost always a better data structure for any mixed-type list. So if you know your code will go through pypy, you can just use a different structure.