Re: [Numpy-discussion] FloatingPointError: overflow encountered in multiply

2011-07-11 Thread Roy Lowrance
I found and fixed the problem. I had performed a distance computation of all point to all points. My points included a query point and I needed to set its distance to something large. So I did distances[query_point] = 1e308; ts = distances / band_width; x = ts * ts and got the overflow, which makes

Re: [Numpy-discussion] FloatingPointError: overflow encountered in multiply

2011-07-10 Thread Charles R Harris
On Sun, Jul 10, 2011 at 8:26 PM, Roy Lowrance 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]: >

[Numpy-discussion] FloatingPointError: overflow encountered in multiply

2011-07-10 Thread Roy Lowrance
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]: ___ NumPy-Discussion mail