Table: Difference between revisions

Jump to navigation Jump to search
535 bytes added ,  08:39, 9 July 2020
(Created page with "{{Built-in|Table|⍪}}, or '''Ravel Items''', is a monadic primitive function which returns a matrix formed by applying Ravel to each major cell of the giv...")
 
Line 39: Line 39:


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:
<source lang=apl>
      ⍪2 3 4 2⍴⎕A
ABCDEFGHIJKLMNOPQRSTUVWX
YZABCDEFGHIJKLMNOPQRSTUV
      {⍵⍴⍨(≢⍵),(×/⍴⍵)÷≢⍵}2 3 4 2⍴⎕A
ABCDEFGHIJKLMNOPQRSTUVWX
YZABCDEFGHIJKLMNOPQRSTUV
      {⍵⍴⍨(1↑⍴⍵),(×/1↓⍴⍵)}2 3 4 2⍴⎕A
ABCDEFGHIJKLMNOPQRSTUVWX
YZABCDEFGHIJKLMNOPQRSTUV
</source>


== External links ==
== External links ==

Navigation menu