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/join.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/doc/join.html') diff --git a/docs/doc/join.html b/docs/doc/join.html index 56975907..9f93eae4 100644 --- a/docs/doc/join.html +++ b/docs/doc/join.html @@ -34,7 +34,7 @@

For this definition to work, major cells of 𝕨 and 𝕩 have to have the same shape. That means that 𝕨≑○(1↓≒)𝕩, and the shape of the result is the sum of the lengths of 𝕨 and 𝕩 followed by their shared major cell shape: to use a self-referential definition, the final shape is given by +β—‹β‰  ∾ βŠ£βΌβ—‹(1↓≒) for arguments of equal rank.

↗️
    a ∾ 2β€Ώ5β₯Šb  # Shapes don't fit
-ERROR
+Error: ∾: Lengths not matchable (3β€Ώ4 ≑ ≒𝕨, 2β€Ώ5 ≑ ≒𝕩)
 

Join To will also allow arguments with ranks that are one apart. In this case, the smaller-rank argument is treated as a major cell in its entirety. If for example 𝕨<β—‹=𝕩, then we must have (≒𝕨)≑1↓≒𝕩, and the result shape is 1⊸+βŒΎβŠ‘β‰’π•©.

↗️
    4β€Ώ2β€Ώ3β€Ώ0 ∾ a
@@ -65,7 +65,7 @@
 "abcdefg"
 
     ∾"abcd"  # Result has to be rank 0, impossible
-ERROR
+Error: βˆΎπ•©: 𝕩 must have an element with rank at least =𝕩
 

However, Join has higher-dimensional uses as well. Given a rank-m array of rank-n arrays (requiring m≀n), it will merge arrays along their first m axes. For example, if the argument is a matrix of matrices representing a block matrix, Join will give the corresponding unblocked matrix as its result.

↗️
    ⊒ m ← (3β€Ώ1β‰βŒœ4β€Ώ2β€Ώ5) β₯ŠΒ¨ 2β€Ώ3β₯Šβ†•6
-- 
cgit v1.2.3