Shape and Reshape
From NARS2000
|
||||
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.