[Numpy-discussion] First impressions on migrating to NumPy

Francesc Altet faltet at carabos.com
Fri Aug 18 06:59:03 CDT 2006


I'm starting to (slowly) replace numarray by NumPy at the core of PyTables, 
specially at those places where the speed of NumPy is *much* better, that is, 
in the creation of arrays (there are places in PyTables where this is 
critical, most specially in indexation) and in copying arrays. In both cases, 
NumPy performs between 8x to 40x than numarray and this is, well..., 
excellent :-)

Also, the big unification between numerical homogeneous  arrays, string 
homogeneous arrays (with unicode support added) and heterogeneous arrays 
(recarrays, with nested records support there also!) is simplyfying very much 
the code in PyTables where there are many places where one have to 
distinguish between those different objects in numarray. Fortunately, this 
distinction is not necessary anymore in many of this places.

Furthermore, I'm seeing that most of the corner cases where numarray do well 
(this was the main reason I was conservative about migrating anyway), are 
also very well resolved in NumPy (in some cases better, as for one, NumPy has 
chosen NULL terminated strings for internal representation, instead of space 
padding in numarray that gave me lots of headaches). Of course, there are 
some glitches that I'll report appropriately, but overall, NumPy is behaving 
better than expected (and I already had *great* expectations).

Well, I just wanted to report these experiences just in case other people is 
pondering about migrating as well to NumPy. But also wanted to thanks (once 
more), the excellent work of the NumPy crew, and specially Travis for their 
first-class work.


>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data

More information about the Numpy-discussion mailing list