diff options
| -rw-r--r-- | src/r.bqn | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -102,6 +102,19 @@ Transpose←{ (c⥊↕m)(+⟜(m⊸×)⊑(⥊𝕩)˜)⌜↕l }⍟(0<=) +SelSub←{ + ! IsArray 𝕨 + ! 1×´⥊Int⌜ 𝕨 + l←≠𝕩 + ! 1×´⥊ ((-l)⊸≤×l⊸>)⌜ 𝕨 + ((⊢+l×0>⊢)⌜𝕨)(1==𝕩)◶{ + c←1×´s←1 Cell 𝕩 + 𝕨((⥊𝕩)⊑˜c⊸×⊸+)⌜s⥊↕c + }‿{ + ⊑⟜𝕩⌜𝕨 + }𝕩 +} + _under_←{ i←↕l←1×´s←≢𝕩 v←⥊𝕨𝔽○𝔾𝕩 @@ -150,19 +163,6 @@ Merge←{ ≤ ↩ !∘0 ⊘ (≤ _perv) identity ← (0⊑⟨!∘0⟩) {(0⊑𝕨){𝕗=𝕩}◶𝕩‿(1⊑𝕨)}´ ⟨+‿0,-‿0,×‿1,÷‿1,⋆‿1,√‿1,∧‿1,∨‿0,|‿0,⌊‿∞,⌈‿¯∞,<‿0,≤‿1,=‿1,≥‿1,>‿0,≠‿0⟩ -SelSub←{ - ! IsArray 𝕨 - ! 1×´⥊Int⌜ 𝕨 - l←≠𝕩 - ! 1×´⥊ ((-l)⊸≤×l⊸>)⌜ 𝕨 - ((⊢+l×0>⊢)⌜𝕨)(1==𝕩)◶{ - c←1×´s←1 Cell 𝕩 - 𝕨((⥊𝕩)⊑˜c⊸×⊸+)⌜s⥊↕c - }‿{ - ⊑⟜𝕩⌜𝕨 - }𝕩 -} - Deshape←IsArray◶{⟨𝕩⟩}‿⥊ Reshape←{ ! 1≥=𝕨 |
