[Numpy-discussion] Questions about converting to numpy

Robert Kern robert.kern@gmail....
Thu Apr 26 14:02:47 CDT 2007


Russell E. Owen wrote:

> But I still don't understand why one shouldn't just use dtype=float or 
> numpy.float. Does that result in an array with a different type of float 
> than numpy.float_ (float64)? Or does it just somehow speed up numpy 
> because it doesn't have to convert the python type into a numpy dtype.

For specifying dtype=float in functions that take such an argument, go ahead and
use dtype=float. There isn't really a reason to use anything else if you don't
want to. However, the scalar type objects are used in other places, so float_
should exist.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco


More information about the Numpy-discussion mailing list