Index Of: Difference between revisions

Jump to navigation Jump to search
207 bytes added ,  10:23, 5 June 2020
GNU
(Created page with "{{Built-in|Index Of|⍳}} is a dyadic primitive function which returns an array of indices where each item in the right argument appears in the left argu...")
 
(GNU)
Line 47: Line 47:


[[NARS2000]] simply compares items of X to the items of Y, and returns the nested array of shape of Y where each item indicates a multi-dimensional index in X. The index for not found items is <source lang=apl inline>⎕IO+⍴X</source>. This also works with [[scalar]] X, though the result (an array filled with empty vectors) is not very meaningful.
[[NARS2000]] simply compares items of X to the items of Y, and returns the nested array of shape of Y where each item indicates a multi-dimensional index in X. The index for not found items is <source lang=apl inline>⎕IO+⍴X</source>. This also works with [[scalar]] X, though the result (an array filled with empty vectors) is not very meaningful.
[[GNU APL]] follows the convention of NARS2000, with the exception that the index for not found items is an [[empty]] [[vector]] <source lang=apl (!) instead of <source lang=apl inline>⎕IO+⍴X</source>.


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

Navigation menu