On Fri, 30 Jun 2006 14:42:33 -0400
"Jonathan Taylor" <[EMAIL PROTECTED]> wrote:

> +1 for some sort of float.  I am a little confused as to why Float64
> is a particularly good choice.  Can someone explain in more detail?
> Presumably this is the most sensible ctype and translates to a python
> float well?

It's "float64", btw. Float64 is the old Numeric name.

Python's "float" type is a C "double" (just like Python's "int" is a C
"long"). In practice, C doubles are 64-bit.

In NumPy, these are the same type:
float32 == single   (32-bit float, which is a C float)
float64 == double   (64-bit float, which is a C double)

Also, some Python types have equivalent NumPy types (as in, they can be used
interchangably as dtype arguments):
int   ==   long        (C long, could be int32 or int64)
float ==   double
complex == cdouble     (also complex128)

Personally, I'd suggest using "single", "float", and "longdouble" in numpy
code.

[While we're on the subject, for portable code don't use float96 or float128:
one or other or both probably won't exist; use longdouble].

-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|[EMAIL PROTECTED]

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to