aboutsummaryrefslogtreecommitdiff
path: root/doc/transpose.md
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-06-20 08:10:31 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-06-20 08:10:31 -0400
commit617d05b2cbb07e2778411b889914eecc156c6d79 (patch)
treeab09f79fa34cde5fd6af55c8f1c67e4fe7cc6e57 /doc/transpose.md
parent7ee066159ac2a60fffc3162cd31d35ce73cfd623 (diff)
Use vector reduce in documentation
Diffstat (limited to 'doc/transpose.md')
-rw-r--r--doc/transpose.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/transpose.md b/doc/transpose.md
index 2acb59e9..e13b6691 100644
--- a/doc/transpose.md
+++ b/doc/transpose.md
@@ -4,7 +4,7 @@ As in APL, Transpose (`⍉`) is a tool for rearranging the axes of an array. BQN
## Monadic Transpose
-Transposing a matrix exchanges its axes, mirroring it across the diagonal. APL extends the function to any rank by reversing all axes, but this generalization isn't very natural and is almost never used. The main reason for it is to maintain the equivalence `a MP b ←→ a MP⌾⍉ b`, where `MP ← +´∘×⎉1‿∞` is the generalized matrix product. But even here APL's Transpose is suspect. It does much more work than it needs to, as we'll see.
+Transposing a matrix exchanges its axes, mirroring it across the diagonal. APL extends the function to any rank by reversing all axes, but this generalization isn't very natural and is almost never used. The main reason for it is to maintain the equivalence `a MP b ←→ a MP⌾⍉ b`, where `MP ← (+´<˘)∘×⎉1‿∞` is the generalized matrix product. But even here APL's Transpose is suspect. It does much more work than it needs to, as we'll see.
BQN's transpose takes the first axis of its argument and moves it to the end.
@@ -108,4 +108,4 @@ A non-array right argument to Transpose is always boxed to get a scalar array be
Monadic transpose is identical to `(≠∘≢-1˜)⊸⍉`, except that for scalar arguments it returns the array unchanged rather than giving an error.
-In Dyadic transpose, the left argument is a number or numeric array of rank 1 or less, and `𝕨≤○≠≢𝕩`. Define the result rank `r←(≠≢𝕩)-+´¬∊𝕨` to be the 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 `i⊑z` of the result `z` is element `(𝕨⊏i)⊑𝕩` of the argument.
+In Dyadic transpose, the left argument is a number or numeric array of rank 1 or less, and `𝕨≤○≠≢𝕩`. Define the result rank `r←(≠≢𝕩)-+´¬∊𝕨` to be the 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 `i⊑z` of the result `z` is element `(𝕨⊏i)⊑𝕩` of the argument.