Do you mean 4$.s  ?
4$.$.d ?

greetings
Ben

On Mon, 20 Jan 2020 at 15:49, 'Sergey Kamenev' via Programming <
[email protected]> wrote:

> Hi!
>
>     ] d=: (?. 3 4$2) * ?. 3 4$100
> 0 55 79  0
> 0 39  0 57
> 0  0  0  0
>
>     ] s=: $. d                  convert d to sparse and assign to s
> 0 1 | 55
> 0 2 | 79                       the display of s gives the indices of the
> 1 1 | 39                       “non-zero” cells and the corresponding
> values
> 1 3 | 57
>
> How I can get dense array with indices of not-empty elements?
> 0 1
> 0 2
> 1 1
> 1 3
>
> Is there a solution without iterating over an dense array?
>
> Nice day!
> Sergey
>
>
>
> ----------------------------------------------------------------------
> 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