[Numpy-discussion] tensordot bug?

Charles R Harris charlesr.harris at gmail.com
Sat Jan 26 01:32:40 EST 2008


Is this a bug?

In [21]: a = ones((2,2))

In [22]: b = ones((2,2,2,2))

In [23]: tensordot(a, tensordot(b, a, 2), 2)
Out[23]: array(16.0)

It seems to me that consistency with the dot product would require a scalar
result, not a 0-dim array.

Also, do we have a plain old tensor product? Outer flattens the indices.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080125/137c7220/attachment.html>


More information about the NumPy-Discussion mailing list