diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-01-18 22:12:28 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-01-18 22:12:28 -0500 |
| commit | 610f7013ef1ec53938c81fd4eef05b7e594f893f (patch) | |
| tree | 77a5629a0907729cad35957b7e63760026ba22f9 /src | |
| parent | 7eaaa5874b4e84d3b2ca3d10d3ede870d7f5ed69 (diff) | |
Fix some high rank issues and improve error messages in Progressive Index Of
Diffstat (limited to 'src')
| -rw-r--r-- | src/r.bqn | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -656,7 +656,12 @@ ReorderAxesInv←{ ⍉ ← Transpose ⊘ ReorderAxes OccurrenceCount ← ⊐˜(⊢-⊏)⍋∘⍋ -ProgressiveIndexOf ← {𝕨⊐○((≠∾2˙)⥊·≍˘⟜OccurrenceCount𝕨⊸⊐)𝕩} +ProgressiveIndexOf ← { + c←1-˜=𝕨 + "⊒: Rank of 𝕨 must be at least 1" ! 0≤c + "⊒: Rank of 𝕩 must be at least cell rank of 𝕨" ! c≤=𝕩 + 𝕨⊐○(((≢∾2˙)⥊≍˘⟜OccurrenceCount∘⥊) 𝕨⊸⊐)𝕩 +} ⊏ ← FirstCell ⊘ (ToArray⊸(SelSub _onAxes_ 1)) ⊑ ↩ First ⊘ Pick |
