3
$\begingroup$

APL64 includes a ⎕DTR system function which, as far as I can tell, is equivalent to ⍉¨⍉ i.e. the transposed outer array with each element also being transposed.*

What is the use case for such a built-in, and why not just use the primitives? A possible answer could for example be that computation of the final result can be optimised more than doing separate transposes.


* Note that the documentation says the "result is an array with the same rank and shape", but this is clearly contradicted by the shown example, and thus appears to be a mistake.

$\endgroup$
4
  • 2
    $\begingroup$ Why the downvote? $\endgroup$
    – Adám
    Commented Jun 20, 2023 at 15:47
  • 1
    $\begingroup$ To me it seems more like {IsSimple ⍵: ⍉⍵ ⋄ ⍉∇¨⍵}. $\endgroup$
    – Bubbler
    Commented Jun 21, 2023 at 4:03
  • $\begingroup$ @Bubbler Ah, that could be, and since APL64 doesn't have dfns, it'd be slightly more awkward to write that. (Btw, IsSimple is 1≥≡) $\endgroup$
    – Adám
    Commented Jun 21, 2023 at 4:31
  • 1
    $\begingroup$ I found a changelist entry saying 'This System Function is very useful when passing arrays to an ActiveX method as arrays needs to be deeply transposed in that case.' Not very illuminating, but seems worth mentioning. $\endgroup$
    – Moonchild
    Commented Aug 15, 2023 at 22:56

0

You must log in to answer this question.

Browse other questions tagged .