aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/r.bqn5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/r.bqn b/src/r.bqn
index 75ef8c09..c9652b58 100644
--- a/src/r.bqn
+++ b/src/r.bqn
@@ -168,9 +168,9 @@ SelSub←{
}
First ← (0<≠)◶⟨Fill,0⊸⊑⟩ Deshape
+IsPure ← {d←Decompose𝕩 ⋄ 2⊸≤◶⟨≤⟜0, 1(𝕊d⊑˜1⊸+)⊸×´·↕1-˜≠∘d⟩0⊑d}
_fillByPure_←{
- p ← {d←Decompose𝕩 ⋄ 2⊸≤◶⟨≤⟜0, 1(𝕊d⊑˜1⊸+)⊸×´·↕1-˜≠∘d⟩0⊑d} 𝕘
- p⊑⟨𝕗,𝕗_fillBy_𝕘⟩
+ 𝕘 {(𝕨HomFil𝕩)_fillBy_𝕨}⍟(IsPure⊣) 𝕗
}
¨ ↩ {𝕨𝔽⌜⊘(𝔽_eachd)_fillByPure_𝔽○ToArray𝕩}
@@ -429,6 +429,7 @@ identity ← {(0⊑𝕨)˙⊸=◶𝕩‿(1⊑𝕨)}´ ⟨
>‿0 , ≥‿1
"´: Identity not found"!0˙
+HomFil ← {((𝕎0) Fill 𝕏)⊘𝕏}⍟(+´⟨=,≠,≡,≢⟩=⊣)
Reshape←{
"𝕨⥊𝕩: 𝕨 must have rank at most 1" ! 1≥=𝕨