Dang. Those look the exact same at first glance. I always enjoy glancing at
your changes.
Also, you always respond to this mailing list so quickly! Would you be willing
to receive a small token of appreciation? I can only manage something like a
Starbucks card but would like to do something more than just a few words in
email.
diff --git a/jsrc/v.c b/jsrc/v.c
index 06e73451..46f4e533 100644
--- a/jsrc/v.c
+++ b/jsrc/v.c
@@ -13,7 +13,7 @@ F1(jtisempty){RZ(w); if(unlikely((AT(w)&SPARSE)!=0))R
eps(zeroionei(0),shape(w))
F1(jtisnotempty){RZ(w); if(unlikely((AT(w)&SPARSE)!=0))R
not(eps(zeroionei(0),shape(w))); R num(AN(w)!=0);} // *@#@,
F1(jtisitems){RZ(w); R num(!AR(w)|!!AS(w)[0]);} // *@# *@:#
F1(jtrank){F1PREFIP; RZ(w); R sc(AR(w));} // #@$
-F1(jtnatoms){F1PREFIP; A z; RZ(w); if(unlikely((AT(w)&SPARSE)!=0))R
df1(z,shape(w),slash(ds(CPLUS))); R sc(AN(w));} // */@$ #@,
+F1(jtnatoms){F1PREFIP; A z; RZ(w); if(unlikely((AT(w)&SPARSE)!=0))R
df1(z,shape(w),slash(ds(CSTAR))); R sc(AN(w));} // */@$ #@,
// ,y and ,"r y - producing virtual blocks
F1(jtravel){A a,c,q,x,y,y0,z;B*b;I f,j,m,r,*u,*v,*yv;P*wp,*zp;
Henry Rich <[email protected]> wrote:
> This was a typo, fixed for next beta.
>
> Henry Rich
>
> On 10/28/2020 4:54 AM, Jan-Pieter Jacobs wrote:
> > Hi,
> >
> > I just found a bug I'd like to report in the execution of special code
> > relating to the number of items in sparse arrays. Apparently only the
> > non-sparse elements are reported when a special combination */@$ or #@, is
> > detected, rather than the total number of elements:
> >
> > a=: $. (* 3>]) 10 10?@$ 10
> > a
> > 0 2 │ 1
> > 0 5 │ 1
> > 0 8 │ 2
> > 1 3 │ 2
> > 1 6 │ 2
> > 1 8 │ 1
> > 1 9 │ 1
> > 2 0 │ 1
> > 2 2 │ 2
> > 2 3 │ 1
> > 3 0 │ 2
> > 3 3 │ 1
> > 3 6 │ 1
> > 4 1 │ 1
> > 4 4 │ 2
> > 5 5 │ 1
> > 5 6 │ 1
> > 6 1 │ 2
> > 6 4 │ 1
> > 6 8 │ 1
> > 7 2 │ 1
> > 8 0 │ 2
> > 8 2 │ 2
> > 9 5 │ 1
> >
> > ('expected';'wrong'),((*/ $ a); (*/@$ a)),:(# ,a);(#@,a)
> > +--------+-----+
> > |expected|wrong|
> > +--------+-----+
> > |100 |20 |
> > +--------+-----+
> > |100 |20 |
> > +--------+-----+
> > '`shape count'=:$`#
> >
> > (*/@shape ; count@,) a NB. these do work
> > +---+---+
> > |100|100|
> > +---+---+
> >
> >
> > Apparently this is both in j901 and 902, so it is not a beta-only problem.
> >
> >
> > Best regards,
> >
> > Jan-Pieter
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm