Shape: Difference between revisions

Jump to navigation Jump to search
38 bytes removed ,  16:04, 24 October 2019
no edit summary
Miraheze>Marshall
No edit summary
Miraheze>Adám Brudzewsky
No edit summary
Line 1: Line 1:
The shape of an array is a [[vector]] of lengths of the array along each [[axis]]. The Shape function <code class="apl">⍴</code> is a [[monadic function]] which returns the shape of its argument array. The [[dyadic function]] [[Reshape]] (<code class="apl">⍴</code>) produces an array of the shape specified by its left argument.
{{Primitive|⍴|Shape}} is a [[monadic function]] which returns the ''shape'' of its argument array, namely a [[vector]] of lengths of the array along each [[axis]]. The [[dyadic function]] using the same symbol is [[Reshape]] which produces an array of the shape specified by its left argument.


An array's shape may be any vector of nonnegative integers with length less than or equal to the [[maximum rank]]. The length of an array's shape is the array's [[rank]], and the product of the shape is its [[bound]]. If the shape is [[Empty array|empty]] then the array is a [[scalar]].
An array's shape may be any vector of nonnegative integers with length less than or equal to the [[maximum rank]]. The length of an array's shape is the array's [[rank]], and the product of the shape is its [[bound]]. If the shape is [[Empty array|empty]] then the array is a [[scalar]].

Navigation menu