[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #40341] Logical indexing into sparse matrices

From: David Spies
Subject: [Octave-bug-tracker] [bug #40341] Logical indexing into sparse matrices causes OOM
Date: Fri, 07 Feb 2014 18:16:39 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0

Follow-up Comment #7, bug #40341 (project octave):

That is an entirely valid and reasonable request, however I'm afraid I can't
ask my supervisor for money for this right now.

I do think I've found a workaround though (at least for numeric matrices).

To say A(B) = 0
I can instead use A = A - A .* B;

And to mean A(B) = C(B);

I can instead use A = A - A .* B + C .* B;

And for v = A(B), I can say v = nonzeros(A .* B);

And for A(B) = v, I can say
[i,j] = find(B);
[m,n] = size(B);
A = A - A .* B + sparse(i,j,v,m,n);


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]