miniapl

— Shape / Reshape

⍴Y gives axis lengths.

⍴2 3⍴0             ⍝ 2x 3x

S⍴Y reshapes, cycling or truncating the ravel of Y. Dimensions are nonnegative integers. Empty Y supplies fill.

2 3⍴1 2            ⍝ 2 3⍴1 2 1 2 1 2
3⍴''               ⍝ '   '

An empty shape makes a scalar.

⍬⍴1 2              ⍝ 1