aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-02-11 14:02:31 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-02-11 14:02:31 -0500
commitf07e748444200bad23c6a44a30af82bc7b7c8e48 (patch)
tree76541d07cc671763e1bdcddf047f110b53a73341 /src
parent0479522e13e439f95bfc533a1297cff4f8175622 (diff)
Always make structural functions enclose atoms
Diffstat (limited to 'src')
-rw-r--r--src/r.bqn8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/r.bqn b/src/r.bqn
index d70f51c4..74152ab8 100644
--- a/src/r.bqn
+++ b/src/r.bqn
@@ -123,14 +123,14 @@ Indices←{
}⍟(0<l)𝕩
}
-Transpose←{
+Transpose←(0<=)◶⟨ToArray,{
l←≠𝕩 ⋄ m←1×´c←1 Cell 𝕩
(c⥊↕m)(+⟜(m⊸×)⊑(⥊𝕩)˙)⌜↕l
-}_fillBy_⊢⍟(0<=)
+}_fillBy_⊢⟩
TransposeInv←{
r←1-˜=𝕩 ⋄ s←≢𝕩 ⋄ l←r⊑s ⋄ c←⊑⟜s⌜↕r
(↕l)(+⟜(l⊸×)⊑(⥊𝕩)˙)⌜c⥊↕1×´c
-}_fillBy_⊢⍟(0<=)
+}_fillBy_⊢⍟{IX IsArray𝕩⋄0<=𝕩}
Reverse←{
"⌽𝕩: 𝕩 must have rank at least 1" ! 1≤=𝕩
@@ -401,7 +401,7 @@ _onAxes_←{
"Multi-axis primitive: Length of 𝕨 must be at most rank of 𝕩" ! 𝕨≤○≠≢𝕩
l←≠𝕨 ⋄ W←⊑⟜(⥊𝕨)
0{(W𝕨)F(1+𝕨)⊸𝕊˘⍟(𝕨<l-1)𝕩}⍟(0<l)𝕩
- }
+ }⟜ToArray
}
÷ ↩ ÷ _perv