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/reshape.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/doc/reshape.html') diff --git a/docs/doc/reshape.html b/docs/doc/reshape.html index e9523103..2dbceced 100644 --- a/docs/doc/reshape.html +++ b/docs/doc/reshape.html @@ -147,7 +147,7 @@ ⟨ 135 136 137 145 146 147 235 236 237 245 246 247 135 136 137 ⟩ 4 0 -ERROR +Error: ⥊: Empty 𝕩 and non-empty result

Reshape is the idiomatic way to make an array filled with a constant value (that is, where all elements are the same) when you know what shape it should have. For an atom element, reshape it directly; for an arbitrary element, first enclose it to create a unit, and then reshape it.

↗️
    34  0
@@ -181,7 +181,7 @@ ERROR
 

These values are just BQN primitives of course. They're not called by Reshape or anything like that; the primitives are just chosen to suggest the corresponding functionality.

Here's an example of the four cases. If we try to turn five elements into two rows, gives an error, drops the last element, uses the first element again, and uses a fill element (like 6"abcde" would).

↗️
    2  "abcde"
-ERROR
+Error: ⥊: Shape must be exact when reshaping with ∘
 
     2  "abcde"
 ┌─    
-- 
cgit v1.2.3