[Numpy-discussion] Floating Point Difference between numpy and numarray
Hanni Ali
hanni.ali@gmail....
Thu Sep 4 08:07:28 CDT 2008
Hi,
Is there a way I can set numpy to use dtype='float64' throughout all my code
or force it to use the biggest datatype without adding the dtype='float64'
to every call to mean, stdev etc..
2008/9/3 Sebastian Stephan Berg <sebastian@sipsolutions.net>
> Hi,
>
> just guessing here. But numarray seems to calculate the result in a
> bigger dataype, while numpy uses float32 which is the input arrays size
> (at least I thought so, trying it confused me right now ...). In any
> case, maybe the difference will be gone if you
> use .mean(dtype='float64') (or whatever dtype numarray actually uses,
> which seems to be "numarray.MaximumType(a.type())" where a is the array
> to take the mean).
>
> Sebastian
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080904/51bb831e/attachment.html
More information about the Numpy-discussion
mailing list