accept non-array args to •internal.Squeeze
and also float replicate
This commit is contained in:
parent
36a27b8424
commit
10e8339012
@ -23,6 +23,7 @@ B refc_c1(B t, B x) {
|
||||
return r;
|
||||
}
|
||||
B squeeze_c1(B t, B x) {
|
||||
if (!isArr(x)) return x;
|
||||
return bqn_squeeze(x);
|
||||
}
|
||||
B isPure_c1(B t, B x) {
|
||||
|
||||
@ -242,6 +242,17 @@ B slash_c2(B t, B w, B x) {
|
||||
}
|
||||
dec(w); dec(x);
|
||||
return r;
|
||||
} else if (TI(x).elType==el_f64) {
|
||||
f64* xp = f64any_ptr(x);
|
||||
f64* rp; B r = m_f64arrv(&rp, ria);
|
||||
for (usz i = 0; i < wia; i++) {
|
||||
i32 c = wp[i];
|
||||
if (c<0) thrF("/: 𝕨 must consist of natural numbers (%i∊𝕨)", c);
|
||||
f64 cx = xp[i];
|
||||
for (usz j = 0; j < c; j++) *rp++ = cx;
|
||||
}
|
||||
dec(w); dec(x);
|
||||
return r;
|
||||
} else {
|
||||
HArr_p r = m_harrs(ria, &ri);
|
||||
BS2B xgetU = TI(x).getU;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user