2,951
edits
No edit summary |
|||
Line 3: | Line 3: | ||
{{Built-in|Indices|⍸}}, or '''Where''', is a [[monadic]] [[primitive function]] which returns the [[Index|indices]] of all ones in a [[Boolean]] array. More generally, Indices accepts an array of non-negative integers and copies each index the corresponding number of times. | {{Built-in|Indices|⍸}}, or '''Where''', is a [[monadic]] [[primitive function]] which returns the [[Index|indices]] of all ones in a [[Boolean]] array. More generally, Indices accepts an array of non-negative integers and copies each index the corresponding number of times. | ||
In [[K]], the first language to include the primitive, it is called Where (<source lang=k inline>&</source>). In [[J]], it is called Indices (<source lang=j inline>I.</source>). | |||
== Examples == | == Examples == |