Index Of: Difference between revisions

Jump to navigation Jump to search
17 bytes removed ,  10:25, 5 June 2020
(GNU)
Line 48: Line 48:
[[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>.
[[GNU APL]] follows the convention of NARS2000, with the exception that the index for not found items is an [[empty]] [[vector]] (!) instead of <source lang=apl inline>⎕IO+⍴X</source>.


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

Navigation menu