From 9044cd0ef0fb10ce2be98b1c2b0d79c8c6452ca2 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sun, 12 Dec 2021 23:33:02 +0200 Subject: [PATCH] =?UTF-8?q?allow=20high-rank=20'a'=20in=20native=20F?= =?UTF-8?q?=E2=8C=BE(a=E2=8A=B8=E2=8A=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/builtins/sfns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builtins/sfns.c b/src/builtins/sfns.c index 285e6090..e8c13f87 100644 --- a/src/builtins/sfns.c +++ b/src/builtins/sfns.c @@ -1196,14 +1196,14 @@ B slash_ucw(B t, B o, B w, B x) { } B select_ucw(B t, B o, B w, B x) { - if (isAtm(x) || rnk(x)!=1 || isAtm(w) || rnk(w)!=1) return def_fn_ucw(t, o, w, x); + if (isAtm(x) || rnk(x)!=1 || isAtm(w)) return def_fn_ucw(t, o, w, x); usz xia = a(x)->ia; usz wia = a(w)->ia; SGetU(w) if (TI(w,elType)!=el_i32) for (usz i = 0; i < wia; i++) if (!q_i64(GetU(w,i))) return def_fn_ucw(t, o, w, x); B arg = select_c2(t, inc(w), inc(x)); B rep = c1(o, arg); - if (isAtm(rep) || rnk(rep)!=1 || a(rep)->ia != wia) thrF("π”½βŒΎ(a⊸⊏)𝕩: Result of 𝔽 must have the same shape as aβŠπ•© (expected ⟨%s⟩, got %H)", wia, rep); + if (isAtm(rep) || !eqShape(w, rep)) thrF("π”½βŒΎ(a⊸⊏)𝕩: Result of 𝔽 must have the same shape as 'a' (expected ⟨%H⟩, got %H)", w, rep); #if CHECK_VALID TALLOC(bool, set, xia); for (i64 i = 0; i < xia; i++) set[i] = false;