Re: [Numpy-discussion] Unexplained nans in matrix multiplication

2009-10-29 Thread Dag Sverre Seljebotn
David Cournapeau wrote: > On Thu, Oct 29, 2009 at 10:26 PM, Dag Sverre Seljebotn > wrote: > >> I'm getting (to me( very mysterious NaNs when doing matrix >> multiplication with certain (randomly generated) data: >> >> In [52]: a.shape, b.shape, i, j >> Out[52]: ((22, 1000), (1000, 22), 0, 16) >

Re: [Numpy-discussion] Unexplained nans in matrix multiplication

2009-10-29 Thread David Cournapeau
On Thu, Oct 29, 2009 at 10:26 PM, Dag Sverre Seljebotn wrote: > I'm getting (to me( very mysterious NaNs when doing matrix > multiplication with certain (randomly generated) data: > > In [52]: a.shape, b.shape, i, j > Out[52]: ((22, 1000), (1000, 22), 0, 16) > > In [53]: np.dot(a, b)[i,j] > Out[53

[Numpy-discussion] Unexplained nans in matrix multiplication

2009-10-29 Thread Dag Sverre Seljebotn
I'm getting (to me( very mysterious NaNs when doing matrix multiplication with certain (randomly generated) data: In [52]: a.shape, b.shape, i, j Out[52]: ((22, 1000), (1000, 22), 0, 16) In [53]: np.dot(a, b)[i,j] Out[53]: (31.322778824758661+nan*j) In [54]: np.dot(a[i,:], b[:,j]) Out[54]: (31.