new ⟨⟩↕0 behavior & fix /⁼large_i8arr

This commit is contained in:
dzaima 2022-09-05 22:40:29 +03:00
parent 7f00d54372
commit 629076d001
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ B ud_c2(B t, B w, B x) {
if (isArr(w)) {
if (RNK(w)>1) thrM("↕: 𝕨 must have rank at most 1");
wia = IA(w);
if (wia==0) { decG(w); return x; }
if (wia==0) { decG(w); return isArr(x)? x : m_atomUnit(x); }
}
ur xr;
if (isAtm(x) || (xr=RNK(x))<wia) thrM("↕: Length of 𝕨 must be at most rank of 𝕩");

View File

@ -748,7 +748,7 @@ B slash_im(B t, B x) {
TALLOC(usz, t, m); \
for (usz j=0; j<m/2; j++) t[j]=0; \
for (usz i=0; i<xia; i++) t[(u##N)xp[i]]++; \
t[m/2]=xia; usz ria=0; for (usz s=0; s<xia; ria++) s+=t[ria]; \
t[m/2]=xia; usz ria=0; for (u64 s=0; s<xia; ria++) s+=t[ria]; \
if (ria>m/2) thrM("/⁼: Argument cannot contain negative numbers"); \
i32* rp; r = m_i32arrv(&rp, ria); for (usz i=0; i<ria; i++) rp[i]=t[i]; \
TFREE(t); \