From 2afb23928e1984d475cc460e1672e8f6fa0e4dbe Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 11 Aug 2021 17:21:31 -0400 Subject: Allow clicking on header to get fragment link --- docs/doc/select.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/doc/select.html') diff --git a/docs/doc/select.html b/docs/doc/select.html index 63a55e1e..213731bf 100644 --- a/docs/doc/select.html +++ b/docs/doc/select.html @@ -4,7 +4,7 @@ BQN: Select -

Select

+

Select

@@ -50,7 +50,7 @@

The function Select (โŠ) reorganizes the array ๐•ฉ along one or more axes based on indices given by ๐•จ. The result has the same depth as ๐•ฉ, since its elements are always elements of ๐•ฉ. This means it differs from Pick (โŠ‘), which takes elements from ๐•ฉ but can arrange them in any nested structure, including returning an element directly.

The monadic form First Cell (โŠ) gets the major cell with index 0, so that โŠ๐•ฉ is identical to 0โŠ๐•ฉ.

-

Single selection

+

Single selection

Each axis of a BQN array is numbered starting at zero. Major cells are arranged along the first axis; in accordance with the leading axis principle, Select returns a major cell of ๐•ฉ when ๐•จ is an atom.

โ†—๏ธ
    2 โŠ "abcdef"  # An enclosed element
 โ”Œยท   
@@ -91,7 +91,7 @@ ERROR
     โŠ 'a'
 ERROR
 
-

First-axis selection

+

First-axis selection

If ๐•จ is an array of numbers (including any empty array), then each number indicates a major cell of ๐•ฉ. In the simplest case, a list of numbers gives a result with the same rank as ๐•ฉ but maybe not the same length.

โ†—๏ธ
    2โ€ฟ3โ€ฟ3โ€ฟ0โ€ฟ4โ€ฟ1 โŠ "OlZEt"
 "ZEEOtl"
@@ -161,7 +161,7 @@ ERROR
   0123" 
        โ”˜
 
-

Multi-axis selection

+

Multi-axis selection

Select also allows ๐•จ to apply to multiple axes of ๐•ฉ simultaneously. For this case, ๐•จ must be a non-empty list (or unit array) where every element is an array of indices.

โ†—๏ธ
    โŸจ2โ€ฟ1, 3โ€ฟ0โ€ฟ0โŸฉ โŠ โ†•3โ€ฟ4
 โ”Œโ”€                         
-- 
cgit v1.2.3