Questions on the construction and manipulation of sparse arrays in Mathematica, with functions like SparseArray[] and Band[].

learn more… | top users | synonyms

15
votes
0answers
201 views

Simple Matrix multiplication takes very long

Bug introduced in 10.1.0 I came across some strange behaviour during a computation involving matrices with symbolic values. It is reproduced below. Multiplying a random 30x30 array with symbolic ...
6
votes
0answers
181 views

Calculating the rank of a huge sparse array

By virtue of the suggestion in my previous question, I constructed the sparse matrix whose size is $518400 \times 86400$, mostly filled with $0$ and $\pm 1$. Now I want to calculate its rank. Since ...
4
votes
0answers
66 views

How can I force the use of sparse diagonalization methods?

When I evaluate the Eigenvalues function on a very large (e.g. 2^16 x 2^16) sparse matrix, Mathematica says something like: Because finding 65536 out of the ...
3
votes
0answers
89 views

Efficient storage of Kronecker sum of circulant matrices+diagonal matrix

I have a square matrix of the form $$M=D+\overset{N}{\underset{n=1}\bigoplus}R_n,$$ where $R_n$ are circulant matrices, $D$ is a diagonal matrix and $\oplus$ is Kronecker sum. Its size is quite big, ...
3
votes
0answers
97 views

Det and MatrixRank freezes on SparseArray with nonzero default value

Bug introduced in 7.0 or earlier and fixed in 9.0.1 or earlier Why does the following simple code never come to an end (at least with version 8) ...
2
votes
0answers
41 views

Approximate inverse of large sparse matrix with small diagonal element

I need to find inverse of a large sparse matrix with small diagonal element. I follow this question - Is there any way to obtain an approximate inverse for very large sparse matrices? and try to use ...
2
votes
0answers
71 views

Memory used by SparseArray objects

In dealing with a quantum mechanics problem, I am representing some many-body states in two different ways in Mathematica. For two parameters n and ...
0
votes
0answers
42 views

Permute indices of a large sparse array

I'm starting with a very large rank 3 tensor, F, that is stored as a SparseArray, and I need to permute its indices. I first tried using ArrayRules to get the positions of the non-zero elements, to ...
0
votes
0answers
71 views

Is there a faster way to do Normal[SparseArray[{{1,1,1}→1.2, {1,1,2}→20.2, …, {m,n,p}→0.3}]]?

I have a list of the form {{1,1,1}→1.2, {1,1,2}→20.2, ..., {m,n,p}→0.3} and I want to create an $m \times n \times p$ array, $A$, where the value of $A[[i,j,k]]$ is ...