2,954
edits
m (Correction: result shape of (f⍤l r) is result shape (not rank) of f appended to the final frame. Also use code to make the expression clearer.) |
(→Frame conformability: NARS2000 has singleton extension for frame conformability) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 13: | Line 13: | ||
== Frame conformability == | == Frame conformability == | ||
{{main|Frame agreement}} | |||
The [[Rank operator]] and [[function rank]] check for conformability not on the entire [[shape]]s of arguments, but only on their [[frame]]s. The same procedure applies to determine whether two frames conform, and if function <syntaxhighlight lang=apl inline>f</syntaxhighlight>'s result shape is known, then the result shape of <syntaxhighlight lang=apl inline>f⍤l r</syntaxhighlight> can be found by appending it to the shape obtained from conformability on the frames computed from [[Rank (operator)|ranks]] <syntaxhighlight lang=apl inline>l</syntaxhighlight> and <syntaxhighlight lang=apl inline>r</syntaxhighlight>. Rather than copying [[element]]s of the extended argument to match the other one, [[cell]]s are copied. | |||
Frame conformability may not allow [[singleton extension]] even when ordinary conformability supports it: [[Dyalog APL]], [[SHARP APL]], and [[A+]] have singleton extension for scalar dyadics but not for Rank (and [[J]] doesn't implement singleton extension). Of these, [[J]] and [[A+]] use [[leading axis agreement]] while SHARP and Dyalog use only empty-frame extension, the equivalent of scalar extension. However, [[NARS2000]] implements Rank with singleton extension for frames. | |||
== External links == | == External links == |