add assertion for arr_shReplace rank expectation
This commit is contained in:
parent
01b17ea0d9
commit
9bb7fa406b
@ -102,7 +102,8 @@ static Arr* arr_shCopyUnchecked(Arr* n, B o) {
|
|||||||
}
|
}
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
static Arr* arr_shReplace(Arr* x, ur r, ShArr* sh) { // replace x's shape with a new one
|
static Arr* arr_shReplace(Arr* x, ur r, ShArr* sh) { // replace x's shape with a new one; assumes r>1, but PRNK(x) can be anything
|
||||||
|
assert(r>1);
|
||||||
usz* prevsh = x->sh;
|
usz* prevsh = x->sh;
|
||||||
u8 xr = PRNK(x);
|
u8 xr = PRNK(x);
|
||||||
SPRNK(x, r);
|
SPRNK(x, r);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user