Table: Difference between revisions

Jump to navigation Jump to search
3 bytes added ,  08:44, 9 July 2020
m
No edit summary
Line 40: Line 40:
Table preserves the array's [[Tally]] (the number of major cells).
Table preserves the array's [[Tally]] (the number of major cells).


Table is equivalent to [[reshape|reshaping]] with the shape where all trailing axis lengths have been replaced by their [[product], or alternatively, the tally concatenated to the [[bound]] divided by the tally:
Table is equivalent to [[reshape|reshaping]] with the shape where all trailing axis lengths have been replaced by their [[product]] or, alternatively, the tally concatenated to the [[bound]] divided by the tally:
<source lang=apl>
<source lang=apl>
       ⍪2 3 4 2⍴⎕A
       ⍪2 3 4 2⍴⎕A
Line 59: Line 59:
YZABCDEFGHIJKLMNOPQRSTUV
YZABCDEFGHIJKLMNOPQRSTUV
</source>
</source>
In languages where [function axis] is available, Table is equivalent to <source lang=apl inline>,[1↓⍳≢⍴Y]</source>:
In languages where [[function axis]] is available, Table is equivalent to <source lang=apl inline>,[1↓⍳≢⍴Y]</source>:
<source lang=apl>
<source lang=apl>
       {,[1↓⍳≢⍴⍵]⍵}2 3 4 2⍴⎕A
       {,[1↓⍳≢⍴⍵]⍵}2 3 4 2⍴⎕A

Navigation menu