Converting bool to float

Charles R Harris charlesr.harris at gmail.com
Wed Nov 1 23:55:39 CST 2006


On 11/1/06, Robert Kern <robert.kern at gmail.com> wrote:
>
> Tim Hochberg wrote:
> > Travis Oliphant wrote:


<snip>

However, whether or not float32 arrays operated with Python float scalars
> give
> float32 or float64 arrays is tangential to my question. Does anyone
> actually
> think that a Python float operated with a boolean array should give a
> float32
> result? Must we *up*cast a boolean array to float64 to preserve the
> precision of
> the scalar?


Probably doesn't matter most of the time, I suppose, who is going to check?
I tend to think doubles because they are a bit faster on the x86
architecture and because they are a pretty common default.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20061101/88fa6bc3/attachment-0001.html 
-------------- next part --------------
-------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


More information about the Numpy-discussion mailing list