|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
| ==Reshape==
| | #redirect [[Rho]] |
| <table border="1" cellpadding="5" cellspacing="0" rules="none" summary="">
| |
| <tr>
| |
| <td>
| |
| <table border="0" cellpadding="5" cellspacing="0" summary="">
| |
| <tr>
| |
| <td valign="top"><apll>Z←L⍴R</apll></td>
| |
| <td></td>
| |
| <td></td>
| |
| <td>returns an array of shape <apll>L</apll> whose items are taken from <apll>R</apll> in row major order, repeated as necessary.</td>
| |
| </tr>
| |
| </table>
| |
| </td>
| |
| </tr>
| |
| <tr>
| |
| <td><apll>L</apll> is a scalar or vector of non-negative integers, and <apll>R</apll> is an arbitrary array.</td>
| |
| </tr>
| |
| <tr>
| |
| <td>If the right argument is empty, the result consists of <apll>×/⍴L</apll> copies of the fill item of <apll>R</apll>.
| |
| </tr>
| |
| </table>
| |
| <br />
| |
| <p>For example, in origin-1</p>
| |
| | |
| <apll> 2 3⍴⍳6<br />
| |
| 1 2 3<br />
| |
| 4 5 6<br />
| |
| 2 3⍴⍳0<br />
| |
| 0 0 0<br />
| |
| 0 0 0<br /></apll>
| |
| | |
| <p>The idea for the latter enhancement was taken from Dyalog APL.</p>
| |
| | |
| ==Rho==
| |
| The symbol {rho} used with no left argument returns the size or dimensions of a scalar, string, vector, array or matrix.
| |
| | |
| {{article footer}
| |
| [[Category:Operators]] | |