MemoryError from numpy.linalg.svd for large matrices

numpy, python, svd

Solution

I think you are just hitting a limit of your RAM: I run this on my Linux box (64Gb of RAM) and the process occupies 14.4 Gb. If you have a 16Gb machine then some of it is occupied by OS and other stuff, so perhaps you just miss a bit of spare RAM for the process.

Problem

The following command will fail on my machine, with Windows 7 ultimate SP1 x64, Python 3.3.3 x64, numpy 1.8.0, and 16GB memory, which seems sufficient for the task. And it also fails on a cluster. ``` python -c "import numpy as np;np.linalg.svd(np.random.random((25000,10000)))" ``` Any ideas about the reason? Thanks.

Original source