Reshape: Difference between revisions

Jump to navigation Jump to search
142 bytes added ,  14:49, 20 November 2019
m
16 revisions imported: Migrate from miraheze
Miraheze>Adám Brudzewsky
m (Text replacement - "</code>" to "</source>")
m (16 revisions imported: Migrate from miraheze)
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Primitive|⍴|Reshape}} produces an array with [[shape]] given by the left argument and [[elements]] from the right argument. Elements are copied from the right argument to the result in [[ravel order]], truncating if the result has smaller [[bound]] than the right argument and repeating cyclically if it has larger bound. If the right argument is empty, [[Fill element|fills]] are used for the result elements.
{{Built-in|Reshape|⍴}} produces an array with [[shape]] given by the left argument and [[elements]] from the right argument. Elements are copied from the right argument to the result in [[ravel order]], truncating if the result has smaller [[bound]] than the right argument and repeating cyclically if it has larger bound. If the right argument is empty, [[Fill element|fills]] are used for the result elements.


== Examples ==
== Examples ==
Line 88: Line 88:


* [https://chat.stackexchange.com/rooms/52405/conversation/lesson-10-apl-functions-- APL Cultivation]
* [https://chat.stackexchange.com/rooms/52405/conversation/lesson-10-apl-functions-- APL Cultivation]
* [https://www.sacrideo.us/apl-a-day-4-arrays-have-elements/ Arrays have elements] (part of [https://www.sacrideo.us/tag/apl-a-day/ APL a Day])


=== Documentation ===
=== Documentation ===


* [http://help.dyalog.com/latest/Content/Language/Primitive%20Functions/Reshape.htm Dyalog]
* [http://help.dyalog.com/latest/index.htm#Language/Primitive%20Functions/Reshape.htm Dyalog]
 
* [http://wiki.nars2000.org/index.php/Rho NARS2000]
* [http://wiki.nars2000.org/index.php/Rho NARS2000]
* [http://microapl.com/apl_help/ch_020_020_470.htm APLX]
* [http://microapl.com/apl_help/ch_020_020_470.htm APLX]
* [https://code.jsoftware.com/wiki/Vocabulary/dollar#dyadic J Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/dollar#dyadic J NuVoc] (as <source lang=apl inline>$</source> "Shape")  
* [https://code.jsoftware.com/wiki/Vocabulary/dollar#dyadic J Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/dollar#dyadic J NuVoc] (as <source lang=apl inline>$</source> "Shape")  


{{APL built-ins}}
{{APL built-ins}}

Navigation menu