Zhenxin Zhan wrote: > Hello, > > I am a new learner of Numpy. From 'numpybook', I use > numpy.linalg.eig(A) to calculate a matrix 2,000*2,000 and it works well. > > But, when I calculate eigen vector for 10,000*10,000 matrix, there is > 'MemoryError' error message in statement numpy.array(...). My laptop > has 4GB memory.
Which OS are you using ? If your OS is 32 bits, you won't be able to use 4 Gb for you python process, and a 10000x10000 matrix is big (the matrix alone takes ~750 Mb of memory). If that's an option, you could also try single precision instead of the default double precision: import numpy as np A = np.array(...., dtype=np.float32) np.linalg.eig(A) cheers, David _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion