I have a 3d matrix of shape  a b c say. But I want to reshape it to have shape 
b a c, while still keeping data positional integrity.
So doing (b,a,c) $, myMatrix 
will not work, as it destroys the relative positional relations between items.
e.g.

mat =: ?  3 10 20 $ 0 NB. shape 3x10x20

I can reshape it using 
|:"2|:"3|:"2 mat

But this seems ugly, and based on past experience there is usually an obvious / 
simple / elegant / in-built way to
do it. It seems like there is a nicer way to do it.

Any ideas?

Thanks,
Jon
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to