At least I believe the result is incorrect.
Let me show my observations. All tests done with ⎕IO←0
I will show 4 invocations of transpose, with the first three being correct
but the fourth one returning the wrong result.
First, let's establish the identity operation for a transpose:
* ⍴ 0
On Wed, Mar 11, 2020 at 12:57:09AM +0800, Elias Mårtenson wrote:
Now, for the problematic version:
* ⍴ 2 4 1 0 3 ⍉ 3 4 5 6 7 ⍴ ⍳100*
┏→┓
┃6 5 3 7 4┃
┗━┛
As you can see, the numbers are all over the place. For some reason, it
seems to have interpreted the left arguments to
Hi,
the IBM APL2 language reference says (page 251):
if Z←L⍉R then:
(⍴Z) ←→ (⍴R)[⍋L]
In our case we have (GNU APL):
⎕IO←0
R←3 4 5 6 7 ⍴ ⍳100
L←2 4 1 0 3
Z←L⍉R
⍴Z
6 5 3 7 4
(⍴R)[⍋