From 675c5af3a9980a598e4ae30521a1cafe9f9fac10 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 20 Jan 2021 20:15:37 -0500 Subject: =?UTF-8?q?Fill=20support=20for=20=C2=A8=20and=20=E2=8C=9C=20with?= =?UTF-8?q?=20operands=20not=20containing=20blocks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/r.bqn | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/r.bqn b/src/r.bqn index 3940e5b8..75ef8c09 100644 --- a/src/r.bqn +++ b/src/r.bqn @@ -168,7 +168,12 @@ SelSub←{ } First ← (0<≠)◶⟨Fill,0⊸⊑⟩ Deshape -¨ ↩ {𝕨(𝔽⌜)⊘(𝔽_eachd)○ToArray𝕩} +_fillByPure_←{ + p ← {d←Decompose𝕩 ⋄ 2⊸≤◶⟨≤⟜0, 1(𝕊d⊑˜1⊸+)⊸×´·↕1-˜≠∘d⟩0⊑d} 𝕘 + p⊑⟨𝕗,𝕗_fillBy_𝕘⟩ +} + +¨ ↩ {𝕨𝔽⌜⊘(𝔽_eachd)_fillByPure_𝔽○ToArray𝕩} StructErr←{𝕩} IsStructErr ← (3=Type)◶⟨0,StructErr˙⊸=⟩ @@ -744,7 +749,7 @@ PrimInverse ← INF _lookup_ ⟨ /, {IA 1==𝕩⋄IA∧´Nat⌜𝕩⋄IX(∧´¯1⊸↓≤1⊸↓)𝕩⋄GroupLen𝕩}⊘(IA∘0) ⊔, GroupIndsInv ⊘ GroupInv ⟩ -⌜ ↩ {𝕨𝔽⌜○ToArray𝕩} +⌜ ↩ {𝕨𝔽⌜_fillByPure_𝔽○ToArray𝕩} _inv_ ← {𝕘⋄𝕨𝔽𝕩} AtopInverse ← {(𝕏𝕎)⊘(𝕏⟜𝕎)}○{Inverse𝕩} Mod1Inverse ← INF˙ _lookup_ ⟨ -- cgit v1.2.3