[Numpy-discussion] Generalised inner product
Mon May 19 05:23:22 CDT 2008
Does numpy have some sort of generalised inner product? For example I have
a.shape = (5,6,7)
b.shape = (8,7,9,10)
and I want to perform a product over the 3rd axis of a and the 2nd of b,
c[i,j,k,l,m] = sum (over x) of a[i,j,x] * b[k,x,l,m]
I guess I could do it with swapaxes and numpy.dot or numpy.inner but I
wondered if there was a general function.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion