Shape: Difference between revisions

Jump to navigation Jump to search
297 bytes added ,  14:42, 14 July 2020
m
Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com"
Miraheze>Adám Brudzewsky
No edit summary
m (Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com")
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{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.
{{Built-in|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]].
Line 18: Line 18:
</source>
</source>


== See also ==
* [[Tally]]
* [[Index generator]]
== External links ==
== External links ==


* '''Lesson:''' [https://chat.stackexchange.com/rooms/52405/conversation/lesson-10-apl-functions-- APL Cultivation]
=== Lessons ===


* '''APL documentation:''' [http://help.dyalog.com/latest/Content/Language/Primitive%20Functions/Shape.htm Dyalog], [http://wiki.nars2000.org/index.php/Rho NARS2000]
* [https://chat.stackexchange.com/rooms/52405/conversation/lesson-10-apl-functions-- APL Cultivation]
* [https://www.sacrideo.us/apl-a-day-3-arrays-have-shape/ Arrays have Shape] (from [https://www.sacrideo.us/tag/apl-a-day/ APL a Day])


* '''J''' (<code>$</code> "Shape Of") '''documentation:''' [https://www.jsoftware.com/help/dictionary/d210.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/dollar NuVoc]
=== Documentation ===


{{APL programming language}}
* [https://help.dyalog.com/latest/index.htm#Language/Primitive%20Functions/Shape.htm Dyalog]
{{APL built-ins}}
* [http://wiki.nars2000.org/index.php/Rho NARS2000]
* [http://microapl.com/apl_help/ch_020_020_460.htm APLX]
* [https://www.jsoftware.com/help/dictionary/d210.htm J Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/dollar J NuVoc] (as <source lang=apl inline>$</source> "Shape Of")
 
{{APL features}}
{{APL built-ins}}[[Category:Primitive functions]][[Category:Array characteristics]]

Navigation menu