[SciPy-User] Creating smaller .mat files

Jaidev Deshpande deshpande.jaidev@gmail....
Wed Jan 18 13:54:06 CST 2012


Hi

I use the savemat function in the scipy.io module quite often.

Suppose you create a .mat file through Python. Most often this file is
unnecessarily large.

Even more interesting - when you open that file into a MATLAB workspace

>> load myfile.mat

And then save it back,

>> save myfile.mat

the size reduces dramatically! (Even though the data types and
precision are kept the same)

Why does this happen?

If this means we can do something to reduce array sizes in the Python
workspace (since MATLAB can recreate the same data from a much smaller
size-on-disk), it would be a great advantage when dealing with large
data.

Thanks


More information about the SciPy-User mailing list