(If this is for a real application and not just an exercise, you probably 
want to just do something directly with the `nonzeros` array inside the 
loop rather than pushing copies to a long array, especially if N and K are 
larger.)

Reply via email to