Structural Functions¶
These functions operate on the shape and arrangement of arrays, not on individual elements.
⍴ Rho¶
Monadic: Shape¶
Returns the dimensions of the array as a vector.
A scalar has empty shape (the result is an empty vector).
Dyadic: Reshape¶
Creates an array with the shape given by the left argument, filled cyclically from the right argument.
⍳ Iota¶
Monadic: Index generator¶
Generates integers from ⎕IO to ⍵.
Dyadic: Index of¶
Returns the position of each right-argument element in the left argument. Returns one past the end if not found. Respects ⎕CT.
, Comma¶
Monadic: Ravel¶
Flattens an array to a vector.
Dyadic: Catenate¶
Joins two arrays.
⌽ Circle stile¶
Monadic: Reverse¶
Dyadic: Rotate¶
Positive rotates left, negative rotates right.
⍉ Circle backslash¶
Monadic: Transpose¶
Swaps rows and columns of a matrix.
↑ Up arrow¶
Dyadic: Take¶
Takes elements from the front (positive) or back (negative).
↓ Down arrow¶
Dyadic: Drop¶
Drops elements from the front (positive) or back (negative).
∈ Epsilon¶
Dyadic: Membership¶
Returns 1 for each left element found in the right argument, 0 otherwise. Respects ⎕CT.
⍋ Grade up¶
Monadic: Grade up¶
Returns indices that would sort ascending. Respects ⎕IO.
⍒ Grade down¶
Monadic: Grade down¶
Returns indices that would sort descending. Respects ⎕IO.