@@ -143,7 +143,7 @@ jttk(J jt, A a, A w) {
143143 r = AR (w);
144144 s = AS (w);
145145 t = AT (w);
146- if ((t & SPARSE) != 0 ) return jttks (jt, a, w);
146+ if (is_sparse (w) ) return jttks (jt, a, w);
147147 DO (
148148 n, if (!u[i]) {
149149 b = 1 ;
@@ -196,8 +196,8 @@ jttake(J jt, A a, A w) {
196196 FPREFIP;
197197 if (!(a && w)) return 0 ;
198198 I wt = AT (w); // wt=type of w
199- if ((SPARSE & AT (a)) != 0 ) RZ (a = jtdenseit (jt, a));
200- if (!(SPARSE & wt )) RZ (w = jtsetfv (jt, w, w));
199+ if (is_sparse (a) ) RZ (a = jtdenseit (jt, a));
200+ if (!is_sparse (w )) RZ (w = jtsetfv (jt, w, w));
201201 ar = AR (a);
202202 acr = jt->ranks >> RANKTX;
203203 acr = ar < acr ? ar : acr;
@@ -252,7 +252,7 @@ jttake(J jt, A a, A w) {
252252 }
253253 }
254254 a = s;
255- // correct if(!(ar|wf|(SPARSE&wt )|!wcr|(AFLAG(w)&(AFNJA)))){ // if there is only 1 take axis, w has no frame
255+ // correct if(!(ar|wf|is_sparse(w )|!wcr|(AFLAG(w)&(AFNJA)))){ // if there is only 1 take axis, w has no frame
256256 // and is not atomic
257257 if (!(ar | wf | ((NOUN & ~(DIRECT | RECURSIBLE)) & wt) | !wcr |
258258 (AFLAG (w) & (AFNJA)))) { // if there is only 1 take axis, w has no frame and is not atomic NJAwhy
@@ -334,7 +334,7 @@ jtdrop(J jt, A a, A w) {
334334 n = AN (a);
335335 u = AV (a); // n=#axes to drop, u->1st axis
336336 // virtual case: scalar a
337- // correct if(!(ar|wf|(SPARSE&wt )|!wcr|(AFLAG(w)&(AFNJA)))){ // if there is only 1 take axis, w has no frame
337+ // correct if(!(ar|wf|is_sparse(w )|!wcr|(AFLAG(w)&(AFNJA)))){ // if there is only 1 take axis, w has no frame
338338 // and is not atomic
339339 if (!(ar | wf | ((NOUN & ~(DIRECT | RECURSIBLE)) & wt) | !wcr |
340340 (AFLAG (w) & (AFNJA)))) { // if there is only 1 take axis, w has no frame and is not atomic BJAwhy
@@ -439,9 +439,9 @@ jthead(J jt, A w) {
439439 return jtfrom (jtinplace, num (0 ), w); // could call jtfromi directly for non-sparse w
440440 }
441441 } else {
442- return SPARSE & AT (w) ? jtirs2 (jt, jfalse, jttake (jt, jtrue, w), 0L , 0L , wcr, reinterpret_cast <AF>(jtfrom))
443- : jtrsh0 (jt, w); // cell of w is empty - create a cell of fills jt->ranks is still
444- // set for use in take. Left rank is garbage, but that's OK
442+ return is_sparse (w) ? jtirs2 (jt, jfalse, jttake (jt, jtrue, w), 0L , 0L , wcr, reinterpret_cast <AF>(jtfrom))
443+ : jtrsh0 (jt, w); // cell of w is empty - create a cell of fills jt->ranks is still
444+ // set for use in take. Left rank is garbage, but that's OK
445445 }
446446 // pristinity from the called verb
447447}
@@ -457,7 +457,7 @@ jttail(J jt, A w) {
457457 return !wcr || AS (w)[wf] ? jtfrom (jtinplace, num (-1 ), w)
458458 : // if cells are atoms, or if the cells are nonempty arrays, result is last cell(s)
459459 // scaf should generate virtual block here for speed
460- SPARSE & AT (w) ? jtirs2 (jt, jfalse, jttake (jt, num (-1 ), w), 0L , 0L , wcr, reinterpret_cast <AF>(jtfrom))
461- : jtrsh0 (jt, w);
460+ is_sparse (w) ? jtirs2 (jt, jfalse, jttake (jt, num (-1 ), w), 0L , 0L , wcr, reinterpret_cast <AF>(jtfrom))
461+ : jtrsh0 (jt, w);
462462 // pristinity from other verbs
463463}
0 commit comments