[Numpy-discussion] dot() instead of tensordot()

Charles R Harris charlesr.harris@gmail....
Mon Mar 10 06:43:46 CDT 2008

On Mon, Mar 10, 2008 at 1:17 AM, royG <roygeorget@gmail.com> wrote:

> hi
> can numpy.dot() be used instead of tensordot()? is there any
> performance difference? I am talking about multipln btw numpy arrays
> of dimensions  50 X 20,000 where elements are of float type.

Dot is the usual matrix multiplication operator, tensordot extends it to
allow contraction on an arbitrary set of indices. If you don't need that
capability just use dot. I suspect dot might be a bit faster, but in your
case the call overhead is probably negligible relative to the computation

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080310/587aabe6/attachment.html 

More information about the Numpy-discussion mailing list