From 4cfeb0f2a9c040e85f67a8d78e8a40de68530e46 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 1 Jun 2022 16:06:28 -0400 Subject: Consistently use the name Reorder Axes, not dyadic Transpose --- docs/doc/transpose.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/doc/transpose.html') diff --git a/docs/doc/transpose.html b/docs/doc/transpose.html index fca1d637..952abc2c 100644 --- a/docs/doc/transpose.html +++ b/docs/doc/transpose.html @@ -87,8 +87,8 @@ ↗️
     ¯2  a23456  # Restrict Transpose to the first three axes
 ⟨ 3 4 2 5 6 ⟩
 
-

In a case like this BQN's Dyadic transpose is much easier.

-

Dyadic Transpose

+

In a case like this the dyadic version of , called Reorder Axes, is much easier.

+

Reorder Axes

Transpose also allows a left argument that specifies a permutation of 𝕩's axes. For each index pi𝕨 in the left argument, axis i of 𝕩 is used for axis p of the result. Multiple argument axes can be sent to the same result axis, in which case that axis goes along a diagonal of 𝕩, and the result will have a lower rank than 𝕩.

↗️
     13204  a23456
 ⟨ 5 2 4 3 6 ⟩
@@ -108,9 +108,9 @@
 ↗️
     2  a23456  # Restrict Transpose to the first three axes
 ⟨ 3 4 2 5 6 ⟩
 
-

Finally, it's worth noting that, as monadic Transpose moves the first axis to the end, it's equivalent to dyadic Transpose with a "default" left argument: (=-1˙).

+

Finally, it's worth noting that, as monadic Transpose moves the first axis to the end, it's equivalent to Reorder Axes with a "default" left argument: (=-1˙).

Definitions

Here we define the two valences of Transpose more precisely.

An atom right argument to either valence of Transpose is always enclosed to get an array before doing anything else.

Monadic transpose is identical to (=-1˙), except that if 𝕩 is a unit it is returned unchanged (after enclosing, if it's an atom) rather than giving an error.

-

In dyadic Transpose, 𝕨 is a number or numeric array of rank 1 or less, and 𝕨≠≢𝕩. Define the result rank r(=𝕩)-+´¬∊𝕨 to be the right argument rank minus the number of duplicate entries in the left argument. We require ´𝕨<r. Bring 𝕨 to full length by appending the missing indices: 𝕨𝕨(¬˜/⊢)r. Now the result shape is defined to be ´¨𝕨⊔≢𝕩. Element iz of the result z is element (𝕨i)𝕩 of the argument.

+

In Reorder Axes, 𝕨 is a number or numeric array of rank 1 or less, and 𝕨≠≢𝕩. Define the result rank r(=𝕩)-+´¬∊𝕨 to be the right argument rank minus the number of duplicate entries in the left argument. We require ´𝕨<r. Bring 𝕨 to full length by appending the missing indices: 𝕨𝕨(¬˜/⊢)r. Now the result shape is defined to be ´¨𝕨⊔≢𝕩. Element iz of the result z is element (𝕨i)𝕩 of the argument.

-- cgit v1.2.3