From c5eef0418df2ae6a97c54839fa010ff60d96f78b Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 8 Jan 2022 16:14:51 -0500 Subject: =?UTF-8?q?Add=20error=20messages=20to=20generated=20markdown=20do?= =?UTF-8?q?cs=20with=20=E2=80=A2CurrentError=20(fixes=20#22)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/doc/reverse.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/doc/reverse.html') diff --git a/docs/doc/reverse.html b/docs/doc/reverse.html index 49d52f50..c90f22f2 100644 --- a/docs/doc/reverse.html +++ b/docs/doc/reverse.html @@ -20,7 +20,7 @@ ┘ 'c' -ERROR +Error: ⌽: Argument cannot be a unit

You can't reverse an atom or rank-0 array because it has no axes to reverse along, or it could be said no ordering to reverse.

To reverse along an axis other than the first, use Cells (˘) or Rank ().

@@ -62,7 +62,7 @@ ERROR ┘ 2 'c' # No axes to rotate -ERROR +Error: ⌽: 𝕩 must have rank at least 1 for atom 𝕨

Elements are always rotated to the left, so that entry i of the result is entry 𝕨+i of the argument—or rather, entry (𝕩)|𝕨+i to enable elements to cycle around. This can be seen directly by using the range n as an argument: then the value of 𝕩 at index i is just i.

↗️
    2  6
@@ -91,7 +91,7 @@ ERROR
 

Rotate also allows 𝕨 to be a list (or unit array) of integers, in which case they're matched with leading axes of 𝕩. This means the length of 𝕨 can't be larger than the rank of 𝕩, or there wouldn't be enough axes to match. This rule also explains why 𝕩 has to have rank one or more when 𝕨 is an atom, because 𝕨 is treated as the one-element list 𝕨 in that case.

↗️
    342  "just a list"
-ERROR
+Error: 𝕨⌽𝕩: Length of compound 𝕨 must be at most rank of 𝕩
 

The expression below rotates the first (vertical) axis of tab by one element, and second by two. So the line of capital letters goes from being one away from the top, up to the top, and the column with '2' goes from horizontal index 2 to index 0.

↗️
    12  tab
-- 
cgit v1.2.3