[Numpy-discussion] tensordot?

Neal Becker ndbecker2 at gmail.com
Tue Mar 1 07:50:06 EST 2011


Neal Becker wrote:

> Can tensordot do this (or some other operator?)
> 
> r[l,i,j] = \sum_k w[i,j,k] y[l,k]

Looks like

r = tensordot (w, y, axes=(2,1)) will produce r[i,j,l], so

transpose (r, (2,0,1))

will do it.




More information about the NumPy-Discussion mailing list