[Numpy-discussion] tensordot bug when summing over same axis indexes?

Jose Borreguero borreguero at gmail.com
Tue Feb 24 14:55:47 EST 2009


The following example:

from numpy import *
a=arange(12).reshape(2,3,2)
b=arange(24).reshape(2,3,2,2)
c=tensordot( a,b,axes=([0,0],[1,1]) )

defaults:
c=tensordot( a,b,axes=([0,0],[1,1]) )
File "/usr/lib/python2.4/site-packages/numpy/core/numeric.py", line 359, in
tensordot
raise ValueError, "shape-mismatch for sum"
ValueError: shape-mismatch for sum

Am I doing something really stupid, or is this a bug?

-Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090224/f513357d/attachment.html>


More information about the NumPy-Discussion mailing list