Skip to main content

↓ — Split / Drop

Function. Keys: Alt-j. Hanzi: 去/拆. Ranks: 1 monadic, 1 ∞ dyadic

↓Y nests vectors along the last axis.

↓2 3⍴⍳6ₓ            ⍝ [[0 1 2] [3 4 5]]ₓ

N↓Y drops from the front; negative N drops from the end.

2↓1 2 3 4          ⍝ 3 4
¯2↓1 2 3 4         ⍝ 1 2

With axes, ⍠K selects the split axis or the drop axes.

↓₀2 3⍴⍳6ₓ          ⍝ [[0 3] [1 4] [2 5]]ₓ

Vector counts apply to successive leading axes. Overdrop gives an empty axis.

1 1↓2 3⍴⍳6ₓ         ⍝ [4 5⋄]ₓ
5↓1 2              ⍝ ⍬

See Mix / Take.

Inverse

↓⁻Y mixes the items of Y into one array.

↓⁻[1 2;3 4]   ⍝ [1 2⋄3 4]