From e2b07a5fd0bbaad232c717fb90a31d6c61d72bd4 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 14 Jul 2022 20:06:50 -0400 Subject: Try to include previous variable definitions in REPL links --- docs/doc/reshape.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/doc/reshape.html') diff --git a/docs/doc/reshape.html b/docs/doc/reshape.html index 68537bf0..e6039f3b 100644 --- a/docs/doc/reshape.html +++ b/docs/doc/reshape.html @@ -75,7 +75,7 @@ ⟨ 135 136 137 145 146 147 235 236 237 245 246 247 ⟩

The elements are ordered in reading order—left to right, then top to bottom. This means that leading axes "matter more" for ordering: if one element comes earlier in the first axis but later in the second than some other element, it will come first in the result. In another view, elements are ordered according to their indices, leading to the name index order for this ordering. To be precise, deshaping the array of indices for an array always gives a sorted array.

-↗️
    ↕≢a
+↗️
    ↕≢a
 ┌─                               
 ╎ ⟨ 0 0 0 ⟩ ⟨ 0 0 1 ⟩ ⟨ 0 0 2 ⟩  
   ⟨ 0 1 0 ⟩ ⟨ 0 1 1 ⟩ ⟨ 0 1 2 ⟩  
@@ -99,7 +99,7 @@
 

The left argument of Reshape gives the shape of the result, except that one entry can be left unspecified for BQN to fill in. We'll look at the cases where a full shape is given first.

Matching lengths

If the number of elements implied by the given shape—that is, ×´𝕨—is equal to the number of elements in 𝕩, then 𝕩 is simply rearranged to match that shape. The element list is kept the same, so that the deshaped result matches the deshaped right argument.

-↗️
    a
+↗️
    a
 ┌─             
 ╎ 135 136 137  
   145 146 147  
@@ -135,7 +135,7 @@
 

Non-matching lengths

If 𝕨 implies a smaller number of elements than are present initially, then only the initial elements of 𝕩 are used. Here the result stops at 237, three-quarters of the way through a, because at that point the result is filled up.

-↗️
    33  a
+↗️
    33  a
 ┌─             
 ╵ 135 136 137  
   145 146 147  
@@ -143,7 +143,7 @@
               ┘
 

If 𝕨 implies a larger number of elements, then elements of 𝕩 are reused cyclically. Below, we reach the last element 247 and start over at 135. If 𝕩 doesn't have any elements to start with, you'll get an error as there aren't any elements available.

-↗️
    15  a
+↗️
    15  a
 ⟨ 135 136 137 145 146 147 235 236 237 245 246 247 135 136 137 ⟩
 
     4  0
-- 
cgit v1.2.3