Re: [Numpy-discussion] Tensor-Like Outer Product Question

2010-08-03 Thread Friedrich Romstedt
2010/8/3 matt_in_nyc : > X is an m by n matrix, and I want to store outer products of the form Y[i] = > numpy.outer(X[i,:], X[i,:]), leading to the relation Y[i,j,k] = > X[i,j]*X[i,k] for i = 0,...,m-1; j,k = 0,...,n-1.  I am trying to think of > how to do this using tensordot, but so far I am find

[Numpy-discussion] Tensor-Like Outer Product Question

2010-08-03 Thread matt_in_nyc
I am trying to perform the following operation: X is an m by n matrix, and I want to store outer products of the form Y[i] = numpy.outer(X[i,:], X[i,:]), leading to the relation Y[i,j,k] = X[i,j]*X[i,k] for i = 0,...,m-1; j,k = 0,...,n-1. I am trying to think of how to do this using tensordot, b