Rank: Difference between revisions

Jump to navigation Jump to search
1 byte added ,  16:12, 24 October 2019
no edit summary
Miraheze>Marshall
(Created page with "''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 oper...")
 
Miraheze>Adám Brudzewsky
No edit summary
Line 1: Line 1:
''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]].''
:''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]].''


The rank of an array is the number of dimensions in its structure, or, in APL terms, the length of its [[shape]]. The traditional expression for the rank of an array <code>A</code> is <code>⍴⍴A</code>. Because this expression results in a one-element [[vector]] rather than a [[scalar]], it is idiomatic in languages with a [[Tally]] function to write <code>≢⍴A</code> instead.
The rank of an array is the number of dimensions in its structure, or, in APL terms, the length of its [[shape]]. The traditional expression for the rank of an array <code>A</code> is <code>⍴⍴A</code>. Because this expression results in a one-element [[vector]] rather than a [[scalar]], it is idiomatic in languages with a [[Tally]] function to write <code>≢⍴A</code> instead.

Navigation menu