aboutsummaryrefslogtreecommitdiff
path: root/help/transpose_reorderaxes.md
blob: 0d243f7443ccee6dfd3023e6a2ebfba589a11ce9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/transpose_reorderaxes.html).*

# Circle Backslash (`⍉`)

## `⍉ 𝕩`: Transpose

Move the first axis of `𝕩` to the end.

           a ← 3‿3 ⥊ ↕9

           ⍉ a

           b ← 1‿2‿3 ⥊ ↕6

           ≢⍉ b



## `𝕨 ⍉ 𝕩`: Reorder Axes

Rearrange the axes of `𝕩` as per the axis indices in `𝕨`.

           ≢ c ← 2‿3‿4‿5‿6 ⥊1

           ≢ 1‿3‿2‿0‿4 ⍉ c