You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hdr,'position (', (":erow,ecol) ,') of m has the value ', (":(<erow,ecol) { ind) ,', but the length of axis ', (":ecol) ,' of y is only ', (":ecol{$w) return.
3230
+
end.
3231
+
end.
3232
+
NB. selectors must be valid here
3233
+
selshape =. <(#ind) , (#@$ind) }.$w NB. each row of ind selects a cell of w
3234
+
case.do.if. e e. EVRANK,EVLENGTH do. hdr,'rank of selector must be < 3'return.end.
3235
+
end.
3236
+
else.NB. boxed selectors
3237
+
selshape =. <@(efindexaudit&($w))"0 ind NB. one result per box
3238
+
end.
3239
+
if. e e. EVINDEX,EVLENGTH,EVDOMAIN do.NB. index-type error - see if any index box had an error
3240
+
if.1 (<L.) selshape do.NB. there is an index-type error
3241
+
errbox =. 1i.~0~:L.@>,selshape
3242
+
hdr,((1<#@, selshape) #'in box ', (":errbox) ,' of m, ') , ($w) ('m';'y') effrommsg errbox {::,selshape return.
3243
+
end.
3244
+
end.
3245
+
cellshapes =. ,selshape NB. all the selections
3246
+
if.-.*./ (-:"_1 _ {.) cellshapes do.if. e=EVDOMAIN do. hdr,'the boxes of m must specify regions of the same shape'return.end.end.
3247
+
cellshapes =. (#,}.@>@{.) cellshapes NB. shape of the selected region
3248
+
if.-. ($a) ([-:-@#@[{.!._1]) cellshapes do.if. e=EVRANK do. hdr,'the shape of x (', (":$a) ,') must be a suffix of the shape of the selection (', (":cellshapes) ,')'return.end.end.
3249
+
end.
3208
3250
NB. ". domain
3209
3251
case.;:'b.'do.
3210
3252
if. e=EVDOMAIN do.
@@ -3303,7 +3345,6 @@ NB. most decoding omitted
3303
3345
case.do. hdr,'unknown x value'return.
3304
3346
end.
3305
3347
case.;:'Z:'do.
3306
-
NB. copy from monad p.
3307
3348
if. e=EVSYNTAX do. hdr,'fold is not running'return.end.
3308
3349
case.;:'@.'do.
3309
3350
if. ism do.NB. the errors in @. must include the selectors
@@ -3369,8 +3410,6 @@ NB. } x domain
3369
3410
if.#emsg=. a efcknumericargs w do. hdr,emsg return.end.
3370
3411
if.#emsg=. a efindexmsg a 9!:23 (0;0) do. hdr,'y must be a nonnegative integer'return.end.
3371
3412
end.
3372
-
NB. A. domain
3373
-
NB. C. domain
3374
3413
case.;:'A.C.'do.
3375
3414
if. e=EVINDEXDUP do. hdr , ('a permutation in '#~1<*/}:$a) ,'y contains a duplicate value'return.end.
0 commit comments