aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/select.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doc/select.html')
-rw-r--r--docs/doc/select.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/doc/select.html b/docs/doc/select.html
index 919a80c0..aaa36cc3 100644
--- a/docs/doc/select.html
+++ b/docs/doc/select.html
@@ -64,7 +64,7 @@
"two"
<span class='Number'>0</span> <span class='Function'>โŠ</span> <span class='Function'>&lt;</span><span class='Number'>5</span> <span class='Comment'># No first axis to select from
-</span>ERROR
+</span><span class='Error'>Error: โŠ: ๐•ฉ cannot be a unit</span>
</pre>
<p>As a major cell of <code><span class='Value'>๐•ฉ</span></code>, the result has rank one less than it and its shape is <code><span class='Number'>1</span><span class='Function'>โ†“โ‰ข</span><span class='Value'>๐•ฉ</span></code>. <code><span class='Value'>๐•ฉ</span></code> must have rank one or more.</p>
<p>The index <code><span class='Value'>๐•จ</span></code> has to be an integer less than <code><span class='Function'>โ‰ </span><span class='Value'>๐•ฉ</span></code>. It can be negative, in which case it must be greater than or equal to <code><span class='Function'>-โ‰ </span><span class='Value'>๐•ฉ</span></code>. Negative indices select from the end of <code><span class='Value'>๐•ฉ</span></code>, in that <code><span class='Number'>ยฏ1</span></code> indicates the last major cell and <code><span class='Function'>-โ‰ </span><span class='Value'>๐•ฉ</span></code> indicates the first. If <code><span class='Function'>โ‰ </span><span class='Value'>๐•ฉ</span></code> is 0, then no index is valid.</p>
@@ -74,7 +74,7 @@
โ”˜
<span class='Number'>0</span> <span class='Function'>โŠ</span> <span class='String'>&quot;&quot;</span>
-ERROR
+<span class='Error'>Error: โŠ: Indexing out-of-bounds (๐•จโ‰ก0, 0โ‰กโ‰ ๐•ฉ)</span>
</pre>
<p>The monadic case First Cell (<code><span class='Function'>โŠ</span><span class='Value'>๐•ฉ</span></code>) is identical to <code><span class='Number'>0</span><span class='Function'>โŠ</span><span class='Value'>๐•ฉ</span></code>. It has the same restrictions: <code><span class='Value'>๐•ฉ</span></code> must have rank 1 or more, and length 1 or more.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqPICJhYmMiCgriio8gImFiYyLiiY0iZGVmIgoK4oqPIOKJjSAiYWJjIgoK4oqPICdhJw==">โ†—๏ธ</a><pre> <span class='Function'>โŠ</span> <span class='String'>&quot;abc&quot;</span>
@@ -89,7 +89,7 @@ ERROR
"abc"
<span class='Function'>โŠ</span> <span class='String'>'a'</span>
-ERROR
+<span class='Error'>Error: โŠ: Argument cannot be an atom</span>
</pre>
<h2 id="first-axis-selection"><a class="header" href="#first-axis-selection">First-axis selection</a></h2>
<p>If <code><span class='Value'>๐•จ</span></code> is an array of numbers (including any empty array), then each number indicates a major cell of <code><span class='Value'>๐•ฉ</span></code>. In the simplest case, a list of numbers gives a result with the same rank as <code><span class='Value'>๐•ฉ</span></code> but maybe not the same length.</p>