[Numpy-discussion] Questions about converting to numpy

Russell E. Owen rowen@cesmail....
Wed Apr 25 15:01:53 CDT 2007

So I finally bit the bullet and converted most of my code from Numeric 
and numarray to numpy. (I haven't yet tried to convert one package that 
makes heavy use of nd_image and has C extensions).

But it left me with a few questions:

- What exception does numpy throw if it runs out of memory? (I can try 
harder to make it do that, but trying to chew up all memory tends to 
slow the machine down and my first tests weren't successful) -- the 
equivalent to numarray.memory.error. The numpy book is silent on the 
issue of what exceptions numpy can throw (at least the index was).

- Is there a list of the data types that we can expect to be available 
on all regular platforms (including 32-bit linux, MacOS X and Windows) 
and of usual speed for computations (instead of some kind of slow 

- Even after reading the book I'm not really clear on why one would use 
numpy.float_ instead of numpy.float or float for day-to-day programming 
(where the size doesn't matter enough to use float64 or whatever). Any 

Overall it went fine. I'm not entirely sure I caught everything yet, but 
the new code seems to be working. 

-- Russell

More information about the Numpy-discussion mailing list