diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-06-03 16:36:34 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-06-03 16:36:34 -0400 |
| commit | 5c2e7dcc6883f121088b1e6556698a02c4668749 (patch) | |
| tree | f5511df92f0147673dfd310d0c97be297456e4ee /src | |
| parent | bd8c5efa3a9aa79df09016bfd9c047023e7cf75d (diff) | |
Allow ⊏ to handle trailing unchanged axes in dyadic ⍉, speeding up cases with large cells
Diffstat (limited to 'src')
| -rw-r--r-- | src/r1.bqn | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -239,9 +239,10 @@ _reorderAxesSub_←{ "𝕨⍉𝕩: Length of 𝕨 must not exceed rank of 𝕩" ! (≠𝕨)≤r←=𝕩 "𝕨⍉𝕩: 𝕨 must consist of valid axis indices" ! 1∧´(Nat∧<⟜r)⌜𝕨 r𝔽↩n←GroupLen𝕨 - a←𝔾 𝕨∾(/0⊸=⌜n)∾{𝕩⊸+⌜↕r-𝕩}≠n - l‿s←a⊸Group1⌜⋈⟜Stride≢𝕩 - (⌊´⌜l) (0<≠∘⊢)◶⟨⥊,((<0)+⌜´s(<+´)⊸(×⌜)⟜↕¨⊣)⊸⊏⟜⥊⟩ _fillBy_ ⊢ 𝕩 + k←≠a←𝔾 𝕨∾/0⊸=⌜n + c‿d←k(↑⋈↓)≢𝕩 + l‿s←a⊸Group1⌜⋈⟜Stride c + (⌊´⌜l) (0<≠∘⊢)◶⟨∾⟜d⊸⥊,((<0)+⌜´s(<+´)⊸(×⌜)⟜↕¨⊣)⊏(⟨1×´c⟩∾d)⥊⊢⟩ ⥊𝕩 } HandleDupAxes←{ r←𝕨-0+´(0⌈-⟜1)⌜𝕩 |
