Henry,
I think Brian may be referring to the indices shown in the sparse
representation.
t=: $. 0 0 1 0 2.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 999 _ 0 0 0
t NB. Index values as expected
2 │ 1
4 │ 2.5
19 │ 2
21 │ 999
22 │ _
_5{. t NB. I would have expected 21 and 22 to match the values in the
original
0 │ 999
1 │ _
5 {. t
2 │ 1
4 │ 2.5
19 { t
2
5 {. 20}.t NB. It looks like it is reindexing after dropping the first 20
values
1 │ 999
2 │ _
Cheers, bob
> On Dec 20, 2017, at 3:06 PM, Henry Rich <[email protected]> wrote:
>
> No, _5 {. z has shape 5.
>
> Henry Rich
>
> On 12/20/2017 6:04 PM, Brian Schott wrote:
>> Negative take seems screwy.
>>
>> $ y=: 0 0 1 0 2.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 999 _ 0 0 0
>> 26
>> _5{. z NB. Should the 0 and 1 be large numbers?
>> 0 │ 999
>> 1 │ _
>> 5{. z
>> 2 │ 1
>> 4 │ 2.5
>>
>>
>> --
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> ---
> This email has been checked for viruses by AVG.
> http://www.avg.com
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm