Rank


 * This page is about array rank, a number associated with every array. For numbers associated with a function specifying its argument rank, see function rank. For the operator that applies a function at a given rank, see Rank operator.

In the APL array model, the rank of an array is the number of dimensions or axes in its structure, or the length of its shape. The traditional expression for the rank of an array  is. Because this expression results in a one-element vector rather than a scalar, it is idiomatic in languages with a Tally function to write  instead.

Arrays are given names based on their rank:

Many APLs have a maximum rank. A function that would produce an array with rank greater than this maximum typically gives a LIMIT ERROR.