Replicate: Difference between revisions

Jump to navigation Jump to search
25 bytes added ,  13:24, 3 April 2020
m
m (Capitalization for ngn/apl)
(One intermediate revision by one other user not shown)
Line 49: Line 49:


=== High-rank arrays ===
=== High-rank arrays ===
Replicate works along a particular [[axis]], which can be specified in languages with [[function axis]] and otherwise is the first axis for <source lang=apl inline>⌿</source>, and the last axis for <source lang=apl inline>/</source> (except in [[A+]], which uses <source lang=apl inline>/</source> for the [[Leading axis theory|first-axis]] form and has no last-axis form, and [[dzaima/APL]], which is similar but uses <source lang=apl inline>⌿</source>).
Replicate works along a particular [[axis]], which can be specified in languages with [[function axis]] and otherwise is the first axis for <source lang=apl inline>⌿</source>, and the last axis for <source lang=apl inline>/</source> (except in [[A+]], which uses <source lang=apl inline>/</source> for the [[Leading axis theory|first-axis]] form and has no last-axis form).
<source lang=apl>
<source lang=apl>
       ⊢A ← 4 6⍴⎕A
       ⊢A ← 4 6⍴⎕A
Line 74: Line 74:
c  ccc
c  ccc
</source>{{Works in|[[APL2]], [[Dyalog APL]], [[APLX]], [[ngn/apl]], [[GNU APL]]}}
</source>{{Works in|[[APL2]], [[Dyalog APL]], [[APLX]], [[ngn/apl]], [[GNU APL]]}}
[[dzaima/APL]] expects arguments of <source lang=apl inline>⌿</source> to have matching shape, and replicates the [[ravel]] of both.


=== Operator or function? ===
=== Operator or function? ===
Line 141: Line 143:
| [[GNU APL]]                                        || Function  || {{Yes}} || {{No}}  || {{Yes}} || {{Yes|APL2}}        || {{Yes}} ||
| [[GNU APL]]                                        || Function  || {{Yes}} || {{No}}  || {{Yes}} || {{Yes|APL2}}        || {{Yes}} ||
|-
|-
| [[dzaima/APL]] (<source lang=apl inline>⌿</source>) || Function  || {{Yes}} || {{Yes}} || {{No}}  || {{None}}            || {{No}}  || Vector right argument only
| [[dzaima/APL]] (<source lang=apl inline>⌿</source>) || Function  || {{Yes}} || {{Yes}} || {{No}}  || {{None}}            || {{No}}  ||
|}
|}


Navigation menu