From efa9759b24567bdda8f6345bd4b6e548e8a278cc Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 3 Jun 2022 22:04:33 -0400 Subject: Editing --- docs/doc/indices.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/doc/indices.html') diff --git a/docs/doc/indices.html b/docs/doc/indices.html index 5c0b9ef6..b062b1b3 100644 --- a/docs/doc/indices.html +++ b/docs/doc/indices.html @@ -100,5 +100,5 @@

Because indices for cells of the same rank have the same shape, it makes sense to make multiple k-cell indices the rows of an array instead of enclosing them. Here's a definition for Select (⊏) when 𝕨 is an array of numbers with rank 1 or more: replace each row of 𝕨 with the cell of 𝕩 that it indicates, yielding a result with the same depth as 𝕩 and shape (Β―1↓≒𝕨)∾(Β―1βŠ‘β‰’π•¨)↓≒𝕩.

To match this format, Range (↕) could be changed to return a flat array when given a shape 𝕩—what is now >↕. Following this pattern, Indices (/) would also return a flat array, where the indices are rows: using the modified Range, β₯Š/β†•βˆ˜β‰’. Here the result cannot retain the argument's array structure; it's always a rank-2 list of rows.

The most interesting feature would be that Select could still allow 𝕨 to be nested. In this case each element of 𝕨 would be an array with cell indices for its rows as before. However, each row can now index along multiple axes, allowing some adjacent axes to be dependent while others remain independent. This nicely unifies scatter-point and per-axis selection, and allows a mix of the two. However, it doesn't allow total freedom, as non-adjacent axes can't be combined except by also mixing in all axes in between.

-

Group (βŠ”) could accept the same index format for its index argument 𝕨. Each depth-1 array in 𝕨 would correspond to multiple axes in the outer result array, but only a single axis in 𝕩 and inner arrays. Because the ravel ordering of indices must be used to order cells of inner arrays, this modification is not quite as clean as the change to Select. It's also not so clearly useful, as the same results can be obtained by using atomic indices and reshaping the result.

+

Group (βŠ”) could accept the same index format for its index argument 𝕨. Each depth-1 array in 𝕨 would correspond to multiple axes in the outer result array, but only a single axis in 𝕩 and inner arrays. Because the index ordering of indices must be used to order cells of inner arrays, this modification is not quite as clean as the change to Select. It's also not so clearly useful, as the same results can be obtained by using atomic indices and reshaping the result.

Overall it seems to me that the main use of cell indices of the type discussed here is for the Select primitive, and the other cases are somewhat contrived and awkward. So I've chosen not to support it in BQN at all.

-- cgit v1.2.3