On this iPad, running J701, amend seems possible for individual matrix cells:
1 2 (1 1;0 2) } 1$.3 4;0 1;0. NB. might not display nicely... 0 2 | 2 1 1 | 1 I can’t check later versions right now, Mike Sent from my iPad > On 20 Jan 2020, at 08:19, 'Sergey Kamenev' via Programming > <[email protected]> wrote: > > 20.01.2020 9:10, Ben Gorte: >> v i } 1$.3 4;0 1;0 NB. amend an 'empty' sparse matrix >> |index error >> | v i}1$.3 4;0 1;0 > > Amend working for 1-dimensional sparse arrays > > y =. 0 0 0 5 0 0 0 9 > ] u =. $. y > u > 3 │ 5 > 7 │ 9 > > 5 (1)} u > 1 │ 5 > 3 │ 5 > 7 │ 9 > > For two dimensional is possible amend only whole row. > (1 2 3 4) (0) } 1$.3 4;0 1;0 > 0 0 │ 1 > 0 1 │ 2 > 0 2 │ 3 > 0 3 │ 4 > > 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
