Rank (operator): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary Tags: Mobile edit Mobile web edit |
(Mention differing semantics of rank in NARS2000.) |
||
Line 113: | Line 113: | ||
,[⍺] ←→ ⍺∘MergeAxes ⍝ for ∧/1=¯2-/⍺ | ,[⍺] ←→ ⍺∘MergeAxes ⍝ for ∧/1=¯2-/⍺ | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Difference among dialects== | |||
Uniquely to [[NARS2000]], negative rank k specifies taking the <syntaxhighlight lang=apl inline>∣k</syntaxhighlight>-cells from the array that results from permuting the k leading axes to the trailing end of the shape; the shape of the cells of argument <syntaxhighlight lang=apl inline>a</syntaxhighlight> specified by rank k is <syntaxhighlight lang=apl inline>(-k)↑⍴a</syntaxhighlight> whether k is negative or positive. It also allows axis specification for the rank operator, denoting what axis the results will go to in the frame; <syntaxhighlight lang=apl inline>x f⍤[ax] l r⊢y</syntaxhighlight> is equivalent to <syntaxhighlight lang=apl inline>⊃[ax] x f⍤l r⊢y</syntaxhighlight> (noting that <syntaxhighlight lang=apl inline>⊃</syntaxhighlight> in NARS2000 is [[Mix]]). | |||
== External links == | == External links == |