[Numpy-discussion] FloatingPointError: overflow encountered in multiply

Charles R Harris charlesr.harris at gmail.com
Sun Jul 10 23:00:58 EDT 2011


On Sun, Jul 10, 2011 at 8:26 PM, Roy Lowrance <roy.lowrance at gmail.com>wrote:

> I have a 1D float64 array ts. I want to square each element, so I compute
>   x = ts * ts
>
> I get a floating point overflow error.
>
> However, when I access each element separately and multiple, I get no
> error:
>   for i in ts.shape[0]:
>
>
Data please. The element by element squaring is handled by python, not
numpy, so I expect numpy and python handle the errors differently. Catching
floating point errors is a bit unreliable in any case. What OS/compiler are
you using? Are you running 32 bit or 64 bit?

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110710/53b6242a/attachment.html>


More information about the NumPy-Discussion mailing list