Re: [Jprogramming] Multidimensional transpose

2022-01-25 Thread Elijah Stone
|: is transpose, as Henry says, but you may also find this interesting: http://www.jsoftware.com/pipermail/general/1999-September/002303.html On Tue, 25 Jan 2022, Pawel Jakubas wrote: Dear J enthusiasts, I am wondering what is an elegant way to realize transpose for arrays of any dimension. I

Re: [Jprogramming] Multidimensional transpose

2022-01-25 Thread Henry Rich
transpose =: |: does what you describe. Henry Rich On 1/25/2022 2:46 PM, Pawel Jakubas wrote: Dear J enthusiasts, I am wondering what is an elegant way to realize transpose for arrays of any dimension. I imagine the transpose would take permutation as x and an array as y: So for tensor we wou

[Jprogramming] Multidimensional transpose

2022-01-25 Thread Pawel Jakubas
Dear J enthusiasts, I am wondering what is an elegant way to realize transpose for arrays of any dimension. I imagine the transpose would take permutation as x and an array as y: So for tensor we would have a permutation of (0,1,2) so 6 possibilities of the transpose. ]t=:i. 3 2 2 0 1 2 3