Re: [julia-users] Function to get Index of nonzero entries in sparse vector

2014-10-10 Thread Pontus Stenetorp
On 10 October 2014 17:07, JVaz wrote: > > I have a sparse vector, is there any function that returns an array with the > index of its nonzero entires? > > E.g I have > > A > > 1048576x1 sparse matrix with 2 Float64 entries: > [1 , 1] = 0.5 > [32801 , 1] = 0.5 > > > I want a f

[julia-users] Function to get Index of nonzero entries in sparse vector

2014-10-10 Thread JVaz
Hello, I have a sparse vector, is there any function that returns an array with the index of its nonzero entires? E.g I have A 1048576x1 sparse matrix with 2 Float64 entries: [1 , 1] = 0.5 [32801 , 1] = 0.5 I want a function(A) --> [1,32801] Thanks! (