[Numpy-discussion] numarray bug: dot product between 2x2 and 3x2x3 on Mac different from PC
Travis Oliphant
oliphant.travis at ieee.org
Tue Jul 18 03:46:30 CDT 2006
Sebastian Haase wrote:
> On Monday 17 July 2006 12:38, Travis Oliphant wrote:
>
> Any idea on my main question ?
> What is the dot product of a 2x2 and 3x2x3 supposed to look like ?
> Why are numarray and numpy giving different answers ??
>
I'm pretty sure the dot-product in Numeric (and I guess numarray too)
was broken for larger than 2-dimensions. This was fixed several months
ago in NumPy.
NumPy dot-product gives the following result
a.shape is (I,L)
b.shape is (J,L,K)
Then c=dot(a,b) will have c.shape = (I,J,K) with
c[i,j,k] = sum(a[i,:]*b[j,:,k])
I'm not even sure what Numeric is computing in this case.
-Travis
More information about the Numpy-discussion
mailing list