scipy.io.loadmat returns MemoryError for big matlab structures
<p>I want to open and process some big .mat files in python. The scipy.io.loadmat function is perfect for that purpose. However, the function returns MemoryError when the .mat files are big. The problem might be due to the python version I use (Python 2.7.10 32 bits, interfaced with spyder). This problem has already been raised but I can't find any decent solution. Ideally, I would be able to open these files without changing my python. Is there a way to make the scipy.io.loadmat function load just some variables contained in the .mat file? </p>

<p>See the documentation here: <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.io.loadmat.html" rel="nofollow">http://docs.scipy.org/doc/scipy/reference/generated/scipy.io.loadmat.html</a></p>

<p>You can pass a list of variable names to read from the file:</p>

<pre><code>scipy.io.loadmat("myfile.mat", variable_names=["myvar1", "myvar2"]) 
</code></pre>

python matlab scipy 32-bit