Tue 26 Nov 2013 04:56:38 PM UTC, original submission:
I have a 64k × 64 matrix, sparse matrix:
spstats(D)
ans =
Compressed Column Sparse (rows = 1, cols = 64000, nnz = 15892 [25%])
...
I wanted to calculate D^-0.5, however it gives this error:
D = D**-0.5
error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt
It was suggested to me to on #octave use:
D(D>0) .^= -0.5
However, this gives the same error. In the end, the following workaround was found, which does work:
Ds = diag(D);
Ds(Ds > 0) .^= -0.5;
Ds = diag(Ds);
It would be good though if the first 2 ways above worked too.
While my matrices at the moment are 64k in size, they are likely to grow. They are actually large graphs, in a 32bit node space. The 64k size will grow and grow over time. Octave has been extremely useful in helping to analyse these graphs. It'd be very useful to me if Octave's index type could support operations on them.
|