Python Save As Matlab .mat File

I used io.savemat to save dictionary in Python into a.mat file that can be processed in Matlab. The file size is 915 MB.
I am using numpy.loadtext to generate a structured Numpy array from a CSV data file that I would like to save to a MAT file for colleagues who are more familiar with MATLAB than Python.
Then I imported the.mat file into matlab and save all variables again in Matlab as another.mat file.Suprisingly, the file size came down to 234 MB, which is much less compared with 915 MB. I thought I lost the precision when did the save in Matlab but I found out no precision was lost after doing subtraction of variables from the two versions of.mat files. I am very curious. Could someone help to explain why?Thanks in advance!
Cannabis sativa monograph pdf. Pharmacopeia in 1850 but removed in 1942. 5,6 Until 1937, Cannabis was used in the United States for medicinal purposes, such as for treating inflamed skin, incontinence, and sexually transmitted diseases.
There are several versions of the.mat files v 7.3, v7, v6, v4. A significant difference between each of the version is the way the data is stored inside them. -v4,-v6: In these versions Matlab allowed storing a variety of structures like sparse arrays, two dimensional double and extended its varied structure storage.
-v7: From this version Matlab started compressing the data. This compression and decompression slowed down the loading and saving process but used very less space in the disk -v7.3: In this version Matlab started to use HDF5 format of storing the data in a compressed chunks. The time required to load the data differed by the way the data is stored among the chunks you can check for detailed information regarding the versions and their features list. You can create any version mat file using the 'save' command in Matlab save(,,) saves to the MAT-file version specified by version. The variables argument is optional, as described above. Eg, A = rand(5); B = magic(10); save('example.mat','A','B','-v7.3') due to the varied versions of mat file. Reading a mat file became a complicated task to carryout.
Here I would describe two ways you could read and create a mat file in python. -v6,-v7 Need to import scipy.io (file_name[, mdict, appendmat]) Load MATLAB file (file_name, mdict[, appendmat,.]) Save a dictionary of names and arrays into a MATLAB-style.mat file. Eg, #!/usr/bin/env python from scipy.io import loadmat x = loadmat('test.mat') lon = x['lon'] lat = x['lat'] # one-liner to read a single variable lon = loadmat('test.mat')['lon'] x['lon']='clon' savemat('changetest.mat',x) Matlab -v7.3 since the data is stored in the form of HDF5 chunks. We need to install python-tables or python-h5py package. Which allows python to access HDF5 chunks. You could use apt-get or download the files from these websites. Eg #!/usr/bin/env python import tables file = tables.openFile('test.mat') lon = file.root.lon[:] lat = file.root.lat[:] # Alternate syntax if the variable name is in a string varname = 'lon' lon = file.getNode('/' + varname)[:] additional references.