diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-08-17 07:35:56 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-08-17 07:35:56 -0400 |
| commit | 9987a58408580bc78d536c71279b91fc851965e8 (patch) | |
| tree | 2853b6c4b81dcf0ee7be38c7c0c42a6e9f796583 | |
| parent | 81e569fe92c4b5047b91550305f8b61b8b67e5d3 (diff) | |
Fix error in multi-axis Replicate description and improve clarity
| -rw-r--r-- | doc/replicate.md | 2 | ||||
| -rw-r--r-- | docs/doc/replicate.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/replicate.md b/doc/replicate.md index 6b1dae8c..fd53caaf 100644 --- a/doc/replicate.md +++ b/doc/replicate.md @@ -79,7 +79,7 @@ If `𝕨` has [depth](depth.md) two, then its elements give the amounts to copy 2‿0 / 1‿0‿0‿1‿1⊸/˘ b -Here the `2‿0` indicates that the first row of `b` is copied twice and the second is ignored, while `1‿0‿0‿1‿1` picks out three entries from that row. `𝕩` can also have more axes than elements of `𝕨`, and the trailing ones aren't changed, just like the simpler case. However, `𝕨` has to have at least as many elements as `𝕩` has axes (so `(≠𝕨)≥=𝕩`), and each element has to have the same length as the corresponding axis in `𝕩`—or it can be a unit, as shown below. +Here the `2‿0` indicates that the first row of `b` is copied twice and the second is ignored, while `1‿0‿0‿1‿1` picks out three entries from that row. As in the single-axis case, `𝕩` can have extra trailing axes that aren't modified by `𝕨`. The rules are that `𝕨` can't have *more* elements than axes of `𝕩` (so `(≠𝕨)≤=𝕩`), and that each element has to have the same length as the corresponding axis—or it can be a unit, as shown below. ⟨<2,<3⟩ / b diff --git a/docs/doc/replicate.html b/docs/doc/replicate.html index 4e8aba5d..77fcb44e 100644 --- a/docs/doc/replicate.html +++ b/docs/doc/replicate.html @@ -148,7 +148,7 @@ 0 3 4 ┘ </pre> -<p>Here the <code><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>0</span></code> indicates that the first row of <code><span class='Value'>b</span></code> is copied twice and the second is ignored, while <code><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>1</span></code> picks out three entries from that row. <code><span class='Value'>𝕩</span></code> can also have more axes than elements of <code><span class='Value'>𝕨</span></code>, and the trailing ones aren't changed, just like the simpler case. However, <code><span class='Value'>𝕨</span></code> has to have at least as many elements as <code><span class='Value'>𝕩</span></code> has axes (so <code><span class='Paren'>(</span><span class='Function'>≠</span><span class='Value'>𝕨</span><span class='Paren'>)</span><span class='Function'>≥=</span><span class='Value'>𝕩</span></code>), and each element has to have the same length as the corresponding axis in <code><span class='Value'>𝕩</span></code>—or it can be a unit, as shown below.</p> +<p>Here the <code><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>0</span></code> indicates that the first row of <code><span class='Value'>b</span></code> is copied twice and the second is ignored, while <code><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>1</span></code> picks out three entries from that row. As in the single-axis case, <code><span class='Value'>𝕩</span></code> can have extra trailing axes that aren't modified by <code><span class='Value'>𝕨</span></code>. The rules are that <code><span class='Value'>𝕨</span></code> can't have <em>more</em> elements than axes of <code><span class='Value'>𝕩</span></code> (so <code><span class='Paren'>(</span><span class='Function'>≠</span><span class='Value'>𝕨</span><span class='Paren'>)</span><span class='Function'>≤=</span><span class='Value'>𝕩</span></code>), and that each element has to have the same length as the corresponding axis—or it can be a unit, as shown below.</p> <a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4p+oPDIsPDPin6kgLyBi">↗️</a><pre> <span class='Bracket'>⟨</span><span class='Function'><</span><span class='Number'>2</span><span class='Separator'>,</span><span class='Function'><</span><span class='Number'>3</span><span class='Bracket'>⟩</span> <span class='Function'>/</span> <span class='Value'>b</span> ┌─ ╵ 0 0 0 1 1 1 2 2 2 3 3 3 4 4 4 |
