Hello all,

I don't understand why the tensor product in APL (∘.×) between two
matrices, gives a multidimensional array as result.

>From linear algebra, tensor product (or kronecker product) gives a
matrix as result,

for example

if I2 is identity matrix

1 0
0 1

I2 (tensor product) I2 gives

1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1

instead if I use the APL operator I have :

1 0
0 1

0 0
0 0


0 0
0 0

1 0
0 1

the result is correct but why the shape is different ?

Is there a way to have a behaviour similar to linear algebra result ?

I wrote a generic tensor product function, but I'm not happy because
it uses loops and I don't like APL with loops :) but I didn't figure
out a loopless solution.

thanks,
Fausto

Reply via email to