Created
June 13, 2011 22:03
-
-
Save jakevdp/1023833 to your computer and use it in GitHub Desktop.
ARPACK memory error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from scipy.sparse.linalg import eigs | |
| N = 6 | |
| k = 2 | |
| # with this random seed, I get a memory error on the third iteration below | |
| np.random.seed(2301) | |
| A = np.random.random((N,N)) | |
| for i in range(3): | |
| print i | |
| evals2, evecs2 = eigs(A, k) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given that many of the memory errors are on or after an allocated block of size 240 bytes = 30 doubles, I think this has to do with the array "v" passed to dnaupd. In this case, the shape of v is (n,ncv) where ncv=2*k+1, with n=6 and k=2 in our case.