aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-08-17 07:35:56 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-08-17 07:35:56 -0400
commit9987a58408580bc78d536c71279b91fc851965e8 (patch)
tree2853b6c4b81dcf0ee7be38c7c0c42a6e9f796583 /docs
parent81e569fe92c4b5047b91550305f8b61b8b67e5d3 (diff)
Fix error in multi-axis Replicate description and improve clarity
Diffstat (limited to 'docs')
-rw-r--r--docs/doc/replicate.html2
1 files changed, 1 insertions, 1 deletions
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'>&lt;</span><span class='Number'>2</span><span class='Separator'>,</span><span class='Function'>&lt;</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