[Jprogramming] Boxing sparse arrays?

Martin Kreuzer info at airkreuzer.com
Sat Dec 23 14:20:41 UTC 2017


Being definitely no expert on that, but a forum 
search with keywords "sparse array boxed" returned e.g. this post:
http://www.jsoftware.com/pipermail/programming/2017-October/049443.html

As for Roger Stokes' LJ book, see

Section 1.9 'Side By Side Displays', where he states:

"Side-by-side displays are not a feature of the J 
system, but merely figures, or illustrations, in 
this book. They show expressions in the first 
row, and corresponding values below them in the second row. "
So, I don't think that he managed to box sparse arrays.

-M

At 2017-12-23 13:35, you wrote:

>Hi all,
>Why can't I box sparse arrays?  I was exploring sparse arrays after it came
>up on the mailing list and was surprised to get a nonce error when I tried
>to box a sparse error.  Using the example given on the dictionary entry for
>$. to demonstrate the issue:
>
>    ] d=: (?. 3 4$2) * ?. 3 4$100
>  0 56  0  6
>85  0  0 96
>  0  0 33  0
>    ] s=: $. d
>0 1 │ 56
>0 3 │  6
>1 0 │ 85
>1 3 │ 96
>2 2 │ 33
>    s ; d
>|nonce error
>|   s    ;d
>    <s
>|nonce error
>|       <s
>    <d
>┌───────────┐
>│ 0 56  0  6│
>│85  0  0 96│
>│ 0  0 33  0│
>└───────────┘
>
>I could not find any mention of this nonce error in the dictionary.  Please
>let me know if I have overlooked something obvious.  And I am curious how
>Roger Stokes managed to box sparse arrays in his LJ book.
>
>Thanks,
>Vijay.
>----------------------------------------------------------------------
>For information about J forums see http://www.jsoftware.com/forums.htm



More information about the Programming mailing list