[Numpy-discussion] tensor dot ?

Simon Burton simon at arrowtheory.com
Fri Aug 25 06:42:19 CDT 2006


>>> numpy.dot.__doc__
matrixproduct(a,b)
Returns the dot product of a and b for arrays of floating point types.
Like the generic numpy equivalent the product sum is over
the last dimension of a and the second-to-last dimension of b.
NB: The first argument is not conjugated.

Does numpy support summing over arbitrary dimensions,
as in tensor calculus ?

I could cook up something that uses transpose and dot, but it's
reasonably tricky i think :)

Simon.

-- 
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com 




More information about the Numpy-discussion mailing list