fix ∾2‿2⥊<0‿0⥊⟨⟩
This commit is contained in:
parent
f65906721d
commit
989970f7fd
@ -883,10 +883,14 @@ B join_c1(B t, B x) {
|
||||
st[a] = len;
|
||||
}
|
||||
|
||||
// Move the data
|
||||
// Shapes known correct; move the data
|
||||
usz* csh = tr ? SH(x0) + r0-tr : NULL; // Trailing shape
|
||||
usz csz = shProd(csh, 0, tr);
|
||||
MAKE_MUT(r, shProd(st, 0, xr)*csz);
|
||||
usz ria = shProd(st, 0, xr);
|
||||
if (mulOn(ria, csz)) thrOOM();
|
||||
Arr* ra;
|
||||
if (ria>0) {
|
||||
MAKE_MUT(r, ria);
|
||||
// Element index and effective shape, updated progressively
|
||||
usz *ei =tsh; for (usz i=0; i<xr; i++) ei [i]=0;
|
||||
usz ri = 0;
|
||||
@ -927,7 +931,11 @@ B join_c1(B t, B x) {
|
||||
ri += (lp[lp[a]+ei[a]]-1) * str;
|
||||
}
|
||||
}
|
||||
Arr* ra = mut_fp(r);
|
||||
ra = mut_fp(r);
|
||||
} else {
|
||||
ra = (Arr*) m_harrUp(0).c;
|
||||
}
|
||||
|
||||
usz* sh = arr_shAlloc(ra, xr+tr);
|
||||
shcpy(sh , st , xr);
|
||||
shcpy(sh+xr, csh, tr);
|
||||
|
||||
@ -193,6 +193,12 @@ w←1‿1⥊1 ⋄ x←2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨•Repr𝕩,": Expe
|
||||
∾⟨"ab", 12, "de"⟩ %% ⟨'a','b',12,'d','e'⟩
|
||||
!"∾: Item trailing shapes must be equal (contained arrays with shapes 3‿3 and 3‿4)" % ∾⟨↕3‿3,↕3‿4⟩
|
||||
!"∾: Item trailing shapes must be equal (contained arrays with shapes ⟨2⟩ and 3‿3)" % ∾⟨1‿2,↕3‿3⟩
|
||||
!"∾: Item ranks along an axis can differ by at most one (contained ranks 1 and 3 along axis 0)" % ∾2‿1 ⥊ ⥊⟜0¨ ⟨0‿2‿3, 0⟩
|
||||
!"∾: Incompatible item shapes (contained arrays with shapes 1‿0 and 1‿0 along axis 1)" % ∾ {1‿𝕩⥊0}¨ [0‿1, 0‿0]
|
||||
!"∾: Incompatible item ranks" % ∾ ⥊⟜0¨ [0‿1⋈0‿1, 0‿1⋈1]
|
||||
∾3‿3⥊<1‿0‿3⥊0 %% 3‿0‿3⥊0
|
||||
∾3‿3⥊<0‿0⥊⟨⟩ %% 0‿0⥊⟨⟩
|
||||
⊑1↑⥊∾3‿3⥊<1‿0‿3⥊<"hi" %% " "
|
||||
|
||||
# 𝕨∾𝕩
|
||||
!"∾: Lengths not matchable (⟨6⟩ ≡ ≢𝕨, 1‿1 ≡ ≢𝕩)" % ("abc"∾"def")∾≍"a"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user