From 95229afb1ab0e0ef2df3448ab566f834a62907bb Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 21 Jun 2021 22:30:52 -0400 Subject: Index order diagram --- docs/doc/reshape.html | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'docs') diff --git a/docs/doc/reshape.html b/docs/doc/reshape.html index 597d0390..73c85f83 100644 --- a/docs/doc/reshape.html +++ b/docs/doc/reshape.html @@ -5,6 +5,59 @@

Deshape and Reshape

+ + + + Index order + + + + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + + + +

The glyph indicates BQN's facilities to reflow the data in an array, giving it a different shape. Its monadic form, Deshape, simply removes all shape information, returning a list of all the elements from the array in reading order. With a left argument, is called Reshape and is a more versatile tool for rearranging the data in an array into the desired shape.

Because of its dependence on the reading order of an array, Reshape is less fundamental than other array operations. Using Reshape in the central computations of a program can be a sign of imperfect usage of arrays. For example, it may be useful to use Reshape to create a constant array or repeat a sequence of values several times, but the same task might also be accomplished more simply with Table , or by taking advantage of leading axis agreement in arithmetic primitives.

Deshape

-- cgit v1.2.3