diff options
Diffstat (limited to 'spec/primitive.md')
| -rw-r--r-- | spec/primitive.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/primitive.md b/spec/primitive.md index ba7a7805..fca283d5 100644 --- a/spec/primitive.md +++ b/spec/primitive.md @@ -161,7 +161,7 @@ For **Select** (`โ`), `๐จ` is an array of natural numbers, or a list of such **First Cell** (`โ`) selects the initial major cell of `๐ฉ`, giving an error if `๐ฉ` has rank 0 or length 0. -**Group** (`โ`) performs an opposite operation to Select, so that `๐จ` specifies not the argument index that result values come from, but the result index that argument values go to. The result rank is `โ ๐จ`, and each result element has rank `1+(=๐ฉ)-+ยด=ยจ๐จ`. The result element contains the minimal list of cells so that each cell of `๐ฉ` appears in the corresponding element of `๐จโ๐จโ๐ฉ`, in index order. **Group Indices** treats its argument `๐ฉ` as a left argument for Group and uses a right argument made up of indices, with the definition `โโ(โโ โ1)`. +**Group** (`โ`) performs an opposite operation to Select, so that `๐จ` specifies not the argument index that result values come from, but the result index that argument values go to. The general case is that `๐จ` is a list of arrays of numbers; if it has depth less than 2 it's converted to this form by first enclosing it if it's an atom, then placing it in a length-1 list. After this transformation, the result rank is `โ ๐จ`, and each result element has rank `(โ ๐จ)+(=๐ฉ)-+ยด=ยจ๐จ`, with the initial `โ ๐จ` axes corresponding to elements of `๐จ` and the remainder to trailing axes of `๐ฉ`. Each atom in `๐จ` can be either a natural number or `ยฏ1` (which indicates the corresponding position in `๐ฉ` will be omitted). If `ยฏ1` doesn't appear, the result has the property that each cell of `๐ฉ` appears in the corresponding element of `๐จโ๐จโ๐ฉ`. More concretely, the length of the result along axis `a` is the maximum value in `aโ๐จ` plus one, or zero if `aโ๐จ` is empty. Axis `a` corresponds to `=aโ๐จ` axes in `๐ฉ`, and an element of the result at position `i` along this axis contains all positions in `๐ฉ` where `i=aโ๐จ`. There may be multiple such positions, and they're arranged along axis `a` of that result element according to their index order in `๐ฉ`. **Group Indices** treats its argument `๐ฉ` as a left argument for Group and uses a right argument made up of indices, with the definition `โโ(โโ โ1)`. **Range** (`โ`) is extended to apply to a list of natural numbers, in addition to the provided case of a single natural number (an enclosed natural number `๐ฉ` should still result in an error). For a list `๐ฉ`, the result is an array of shape `๐ฉ` in which the value at a given index is that index, as a list of natural numbers. That is, `iโกiโโ๐ฉ` for any list of natural numbers `i` with `โงยดi<๐ฉ`. |
