From 43459e8322548d742d116af5ee0527283fa540c5 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 2 Jan 2021 21:45:17 -0500 Subject: Add documentation for Deshape and Reshape --- docs/doc/leading.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/doc/leading.html') diff --git a/docs/doc/leading.html b/docs/doc/leading.html index 9b7113ea..45f0a83a 100644 --- a/docs/doc/leading.html +++ b/docs/doc/leading.html @@ -111,7 +111,7 @@

The other two monadic functions that work on high-rank arguments are Deshape () and First (). These treat the argument as one long list, ordered by its element indices. This ordering privileges leading axes (in fact, it is the reason for the choice of leading axes in the leading axis convention), but these functions can't really be said to work on leading axes: they apply to all axes.

The Each (¨) and Table () modifiers return functions which are the same in the monadic case. These functions simply go through all elements of the argument array without regard for its multi-dimensional structure (the operand is applied to elements in index order, matching Deshape; this matters if it has side effects). Similarly, monadic arithmetic functions do not have any sort of leading axis dependence.

Dyadic functions

-

For dyadic functions the pattern of working on only one argument axis is not so common. Only two functions can be said to follow it roughly: Join to () combines two arrays along one axis, using the first axis of both arguments if they have the same rank and of the higher-rank argument if they differ by one. Couple (), like Solo, does not manipulate the argument axes but adds a result axis. There are also some functions that can't be limited to leading axes: Reshape () treats the argument as one long list, and Pick () requires each index to be as long as the right argument's rank, because it selects elements and not cells from the right argument.

+

For dyadic functions the pattern of working on only one argument axis is not so common. Only two functions can be said to follow it roughly: Join to () combines two arrays along one axis, using the first axis of both arguments if they have the same rank and of the higher-rank argument if they differ by one. Couple (), like Solo, does not manipulate the argument axes but adds a result axis. There are also some functions that can't be limited to leading axes: Reshape () treats the argument as one long list, and Pick () requires each index to be as long as the right argument's rank, because it selects elements and not cells from the right argument.

Multiple axes

Instead of always working on a single axis, many dyadic functions work on one axis by default, but also allow a left argument with multiple elements corresponding to leading axes of the right argument. To decide which of the two possibilities applies, these functions test the left argument depth, a convention that is discussed in the depth documentation. A left argument that applies to one axis has a particular depth; the argument can also be a list of such arguments.

-- cgit v1.2.3