diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/indices.md | 2 | ||||
| -rw-r--r-- | doc/primitive.md | 2 | ||||
| -rw-r--r-- | doc/rank.md | 2 | ||||
| -rw-r--r-- | doc/transpose.md | 8 |
4 files changed, 7 insertions, 7 deletions
diff --git a/doc/indices.md b/doc/indices.md index bffd132c..b2bff7cd 100644 --- a/doc/indices.md +++ b/doc/indices.md @@ -20,7 +20,7 @@ The following functions take or return indices. Except where marked, the indices | | `β` | `π¨` | Major cell or along-axis number | `β` | | | Axis number -In Dyadic [Transpose](transpose.md#dyadic-transpose) (`β`), `π¨` is made up of indices into axes of `π©`. Since array shape is 1-dimensional, there is only one sensible choice for these elements, a single number each. +In [Reorder Axes](transpose.md#reorder-axes) (`β`), `π¨` is made up of indices into axes of `π©`. Since array shape is 1-dimensional, there is only one sensible choice for these elements, a single number each. ## Element indices diff --git a/doc/primitive.md b/doc/primitive.md index afa5a7f7..fd514390 100644 --- a/doc/primitive.md +++ b/doc/primitive.md @@ -46,7 +46,7 @@ A function call with one argument (prefix) is called "monadic" and one with two | `Β»` | [Nudge](shift.md) | [Shift Before](shift.md) | `Β«` | [Nudge Back](shift.md) | [Shift After](shift.md) | `β½` | [Reverse](reverse.md) | [Rotate](reverse.md#rotate) -| `β` | [Transpose](transpose.md) | [Reorder axes](transpose.md) +| `β` | [Transpose](transpose.md) | [Reorder Axes](transpose.md) | `/` | [Indices](replicate.md#indices) | [Replicate](replicate.md) | `β` | [Grade Up](order.md#grade) | [Bins Up](order.md#bins) | `β` | [Grade Down](order.md#grade) | [Bins Down](order.md#bins) diff --git a/doc/rank.md b/doc/rank.md index 3bce4c44..7c1e2912 100644 --- a/doc/rank.md +++ b/doc/rank.md @@ -196,7 +196,7 @@ This is why the rank of `β1βΏβ` that leads to a frame `β¨3β©` on the left On the other hand, Rank doesn't care about the argument cell shapesβit leaves that up to the function `π½`. If `π½` is an arithmetic function, you'll get *two* layers of prefix agreement: one outer matching with `β`, and an inner one with `π½`. -It's also possible to apply multiple copies of Rank, which in general is powerful enough to match and not-match axes in any combination as long as the axes for each argument stay in order (of course, BQN also provides the tools to [reorder axes](transpose.md#dyadic-transpose)). +It's also possible to apply multiple copies of Rank, which in general is powerful enough to match and not-match axes in any combination as long as the axes for each argument stay in order (of course, BQN also provides the tools to [reorder axes](transpose.md#reorder-axes)). One of the relatively more common instance of this pattern is a variation on the [Table](map.md#table) modifier, to work with cells instead of elements. Here we'll make a table of all combinations of one row (1-cell) from `π¨` and one from `π©`. To do this, we want to first line up each row of `π¨` with the whole of `π©`. As in a matrix product, that's `β1βΏβ`. But then we'd like to pair that row with the rows of `π©` individually, which could be written `βββΏ1`. But since we know the left argument has been reduced to lists, `β1` also works. We then arrange the two layers of mapping with `β1` on the inside, giving `(βΎβ1)β1βΏβ`. diff --git a/doc/transpose.md b/doc/transpose.md index 64d1cbe2..f1f978ad 100644 --- a/doc/transpose.md +++ b/doc/transpose.md @@ -63,9 +63,9 @@ Axis permutations of the types we've shown generate the complete permutation gro β’ ββΌβΒ―2 β a23456 # Restrict Transpose to the first three axes -In a case like this BQN's Dyadic transpose is much easier. +In a case like this the dyadic version of `β`, called Reorder Axes, is much easier. -## Dyadic Transpose +## Reorder Axes Transpose also allows a left argument that specifies a permutation of `π©`'s axes. For each index `pβiβπ¨` in the left argument, axis `i` of `π©` is used for axis `p` of the result. Multiple argument axes can be sent to the same result axis, in which case that axis goes along a diagonal of `π©`, and the result will have a lower rank than `π©`. @@ -85,7 +85,7 @@ In particular, the case with only one axis specified is interesting. Here, the f β’ 2 β a23456 # Restrict Transpose to the first three axes -Finally, it's worth noting that, as monadic Transpose moves the first axis to the end, it's equivalent to dyadic Transpose with a "default" left argument: `(=-1Λ)βΈβ`. +Finally, it's worth noting that, as monadic Transpose moves the first axis to the end, it's equivalent to Reorder Axes with a "default" left argument: `(=-1Λ)βΈβ`. ## Definitions @@ -95,4 +95,4 @@ An atom right argument to either valence of Transpose is always enclosed to get Monadic transpose is identical to `(=-1Λ)βΈβ`, except that if `π©` is a unit it is returned unchanged (after enclosing, if it's an atom) rather than giving an error. -In dyadic Transpose, `π¨` is a number or numeric array of rank 1 or less, and `π¨β€ββ β’π©`. Define the result rank `rβ(=π©)-+´¬βπ¨` to be the right argument rank minus the number of duplicate entries in the left argument. We require `β§Β΄π¨<r`. Bring `π¨` to full length by appending the missing indices: `π¨βΎβ©π¨(Β¬ββΛ/β’)βr`. Now the result shape is defined to be `β´¨π¨ββ’π©`. Element `iβz` of the result `z` is element `(π¨βi)βπ©` of the argument. +In Reorder Axes, `π¨` is a number or numeric array of rank 1 or less, and `π¨β€ββ β’π©`. Define the result rank `rβ(=π©)-+´¬βπ¨` to be the right argument rank minus the number of duplicate entries in the left argument. We require `β§Β΄π¨<r`. Bring `π¨` to full length by appending the missing indices: `π¨βΎβ©π¨(Β¬ββΛ/β’)βr`. Now the result shape is defined to be `β´¨π¨ββ’π©`. Element `iβz` of the result `z` is element `(π¨βi)βπ©` of the argument. |
