Shape and Reshape: Difference between revisions
From NARS2000
Jump to navigationJump to search
m (Paul Robinson moved page Reshape and Rho to Shape and Reshape) |
No edit summary |
||
Line 34: | Line 34: | ||
==Rho== | ==Rho== | ||
The symbol {rho} used with no left argument returns the size or dimensions of a scalar, string, vector, array or matrix. | 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]] |
Revision as of 20:06, 26 November 2014
Reshape
|
||||
L is a scalar or vector of non-negative integers, and R is an arbitrary array. | ||||
If the right argument is empty, the result consists of ×/⍴L copies of the fill item of R. |
For example, in origin-1
2 3⍴⍳6
1 2 3
4 5 6
2 3⍴⍳0
0 0 0
0 0 0
The idea for the latter enhancement was taken from Dyalog APL.
Rho
The symbol ⍴ used with no left argument returns the size or dimensions of a scalar, string, vector, array or matrix.
{{article footer}