Indices: Difference between revisions

Jump to navigation Jump to search
80 bytes added ,  20:05, 4 August 2021
Line 71: Line 71:


Indices (<source lang=apl inline>⍸</source>) was first introduced to APL, and the [[nested array model]], by [[NARS2000]]. Originally defined only for vectors, the generalised definition <source lang=apl inline>(,R)/,⍳⍴1/R</source> was introduced in about 2013 after some experimentation with alternatives.<ref>NARS2000 Wiki. [http://wiki.nars2000.org/index.php?title=Indices&direction=next&oldid=863 Indices]. Old revision: 2013-05-26.</ref> Where (<source lang=apl inline>⍸</source>) was added to [[Dyalog APL 16.0]] (June 2017), with the nearly-identical definition <source lang=apl inline>{(,⍵)⌿,⍳⍴⍵}</source>, but also with the restriction that the argument be Boolean. This restriction that was lifted to allow non-negative integers in [[Dyalog APL 18.0|18.0]] (2020). For a [[scalar]] <source lang=apl inline>I</source>, Dyalog's definition gives <source lang=apl inline>I⍴⊂⍬</source> for <source lang=apl inline>⍸I</source>, while NARS2000 returned <source lang=apl inline>I⍴1</source>. By January 2018, NARS2000 switched to Dyalog's definition, removing the discrepancy for scalar arguments.
Indices (<source lang=apl inline>⍸</source>) was first introduced to APL, and the [[nested array model]], by [[NARS2000]]. Originally defined only for vectors, the generalised definition <source lang=apl inline>(,R)/,⍳⍴1/R</source> was introduced in about 2013 after some experimentation with alternatives.<ref>NARS2000 Wiki. [http://wiki.nars2000.org/index.php?title=Indices&direction=next&oldid=863 Indices]. Old revision: 2013-05-26.</ref> Where (<source lang=apl inline>⍸</source>) was added to [[Dyalog APL 16.0]] (June 2017), with the nearly-identical definition <source lang=apl inline>{(,⍵)⌿,⍳⍴⍵}</source>, but also with the restriction that the argument be Boolean. This restriction that was lifted to allow non-negative integers in [[Dyalog APL 18.0|18.0]] (2020). For a [[scalar]] <source lang=apl inline>I</source>, Dyalog's definition gives <source lang=apl inline>I⍴⊂⍬</source> for <source lang=apl inline>⍸I</source>, while NARS2000 returned <source lang=apl inline>I⍴1</source>. By January 2018, NARS2000 switched to Dyalog's definition, removing the discrepancy for scalar arguments.
The [[#inverse|inverse]] of Indices became supported with [[Dyalog APL 18.0]].


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

Navigation menu