[Numpy-discussion] Toward release 1.0 of NumPy

Charles R Harris charlesr.harris at gmail.com
Thu Apr 13 13:33:08 CDT 2006


On 4/13/06, Tim Hochberg <tim.hochberg at cox.net> wrote:
> Alan G Isaac wrote:
> >On Thu, 13 Apr 2006, Charles R Harris apparently wrote:
> >
> >
> >>The Kronecker product (aka Tensor product) of two
> >>matrices isn't a matrix.
> >>
> >>
> >
> >That is an unusual way to describe things in
> >the world of econometrics.  Here is a more
> >common way:
> >http://planetmath.org/encyclopedia/KroneckerProduct.html
> >I share Sven's expectation.
> >
> >
> mathworld also agrees with you. As does the documentation (as best as I
> can tell) and the actual output of kron. I think Charles must be
> thinking of the tensor product instead.

It *is* the tensor product, A \tensor B, but it is not the most general
tensor with four indices just as a bivector is not the most general tensor
with two indices. Numerically, kron chooses to represent the tensor product
of two vector spaces a, b with dimensions n,m respectively as the direct sum
of n copies of b, and the  tensor product of two operators takes the given
form. More generally, the B matrix in each spot could be replaced with an
arbitrary matrix of the correct dimensions and you would recover the general
tensor with four indices.

Anyway, it sounds like you are proposing that the tensor (outer) product of
two matrices be reshaped to run over two indices. It seems that likewise the
tensor (outer) product of two vectors should be reshaped to run over one
index (i.e. flat). That would do the trick.

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

More information about the Numpy-discussion mailing list