Although Roger writes that sparse boxed arrays are not supported
the following expression produces a boxed sparse array
   ]q=. $.&.><10>[EMAIL PROTECTED]
+-----------+
|3404786 | 1|
|4791128 | 1|
|5741120 | 1|
|6806391 | 1|
|7772811 | 1|
|8240401 | 1|
|9576630 | 1|
+-----------+

This might be a bug, in which case can we please have it not-fixed in the
next release?

David



On 3/1/08, Roger Hui <[EMAIL PROTECTED]> wrote:
>
> I have not studied your msg in detail but I note that
> sparse boxed arrays are not supported.
>
>
>
>
> ----- Original Message -----
> From: Fraser Jackson <[EMAIL PROTECTED]>
> Date: Friday, February 29, 2008 23:59
> Subject: [Jbeta] Unexpected  verb behaviour with a sparse array argument
> To: Beta forum <[email protected]>
>
> > The following using the r beta has some behaviour I do not
> > understand. On
> > testing it appears unchanged from J601.
> >
> > The first section below is a session log.  The second
> > section the script.
> >
> > Log ******************
> >    a =: >: ?. 2 3 4$20
> >
> >    b =: $.a
> >
> >    marginald =: 4 : 0
> > x =. >x     NB.  provide option of
> > either boxed or unboxed x arg
> > +/ ^:(n-#x) (  (vi =. (i.(n =. #$y)) -. x),x)|: y
> > )
> >
> >    marginal1sp =: 4 : 0
> >  < 0$. x marginald y
> > )
> >
> >
> >    c =: 0 marginal1sp b
> >
> >    3!:0 c
> > 32
> >
> >    ( i.#$b)  marginal1sp "0 _  b
> > 1 │ ┌───────────┐
> > 2 │ │114 88 77  │
> >   │ ├───────────┤
> >   │ │68 88 52 71│
> >   │ └───────────┘
> >
> >    Note 'Questions and comment'
> > 1.  the result of marginal1sp is a box atom not a
> > sparse boxed atom. Why is the result of the above line
> > a sparse array?
> >
> > 2.  there are three atoms in the left argument.  Why does
> > the result only contain two results?  Is there a bug in
> > the display of sparse arrays here?
> >
> > 3.  I get the expected result with three elements
> > when I enter
> >
> > 0 $. ( i.#$b)  marginal1sp "0 _  b
> >
> > )
> >
> > Script **************************
> > a =: >: ?. 2 3 4$20
> >
> > b =: $.a
> >
> > marginald =: 4 : 0
> > x =. >x     NB.  provide option of
> > either boxed or unboxed x arg
> > +/ ^:(n-#x) (  (vi =. (i.(n =. #$y)) -. x),x)|: y
> > )
> >
> > marginal1sp =: 4 : 0
> >  < 0$. x marginald y
> > )
> >
> >
> > c =: 0 marginal1sp b
> >
> > 3!:0 c
> >
> > ( i.#$b)  marginal1sp "0 _  b
> >
> >  0 $. ( i.#$b)  marginal1sp "0 _  b
> > End of script ***********************************
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to