tensor product

Tim Hochberg tim.hochberg at ieee.org
Mon Oct 9 08:01:01 CDT 2006

Charles R Harris wrote:
> Hi Nadav,
> On 10/8/06, *Nadav Horesh* <nadavh at visionsense.com 
> <mailto:nadavh at visionsense.com>> wrote:
>     There is a "tensortdot" function in numpy1.0rc1
> The tensordot is not the same thing as a tensor product. What I want 
> is the following:
> def tensor(a, b) :
>     """Tensor product of a and b
>     """
>     a = asarray(a)
>     b = asarray(b)
>     return outer(a, b).reshape(a.shape + b.shape)
Is this not the same things as numpy.multiply.outer(a, b)? (as opposed 
to outer(a, b), which appears to pretend that everything is a vector -- 
I'm not sure what the point of that is).


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash

More information about the Numpy-discussion mailing list