From a17782ce2ec31709ce30edb3d96fe2f3a9a6ed1f Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 24 Jul 2021 22:47:46 -0400 Subject: Documentation on fill elements --- 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 73c85f83..5736da15 100644 --- a/docs/doc/reshape.html +++ b/docs/doc/reshape.html @@ -142,7 +142,7 @@ 235 236 237 ┘ -

If the left argument implies a larger number of elements, then the argument elements are reused cyclically. Below, we reach the last element 247 and start over at 135. If the array doesn't have any elements to start with, its fill value is used instead, but it's probably best not to invoke this case!

+

If the left argument implies a larger number of elements, then the argument elements are reused cyclically. Below, we reach the last element 247 and start over at 135. If the array doesn't have any elements to start with, its fill element is used instead, but it's probably best not to invoke this case!

↗️
    15  a
 ⟨ 135 136 137 145 146 147 235 236 237 245 246 247 135 136 137 ⟩
 
@@ -176,7 +176,7 @@
 
  • says the length must be an exact fit, and gives an error in such a case.
  • rounds the length down, so that some elements are discarded.
  • rounds the length up, repeating elements to make up the difference.
  • -
  • rounds the length up, but uses the argument's fill values for the needed extra elements.
  • +
  • rounds the length up, but uses the argument's fill for the needed extra elements.
  • 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. 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 5"abcde" would).

    -- cgit v1.2.3