pick_sells handles rank 1

noticed by test/cells.bqn
This commit is contained in:
dzaima 2025-05-28 03:48:43 +03:00
parent ac2f1e276c
commit 13068480ca

View File

@ -251,7 +251,7 @@ static NOINLINE B select_cells(usz ind, B x, ur xr, usz cam, usz k) { // ind ⊏
return r;
}
static NOINLINE B pick_cells(usz ind, B x, ur xr, usz cam, usz k) { // ind <∘⊑⎉¯k x
assert(xr == RNK(x) && xr>1 && k<=xr);
assert(xr == RNK(x) && xr>0 && k<=xr);
usz* xsh = SH(x);
usz l = shProd(xsh, k, xr);
assert(ind < (k==xr? 1 : xsh[k]) && cam*l == IA(x));