[Mne_analysis] np arrays to Matlab?

Maria Hakonen maria.hakonen at gmail.com
Wed Oct 22 02:52:27 EDT 2014
Search archives:

Hi all,

I wonder if it is possible to pass the np arrays in Matlab?

I tried:
scipy.io.savemat('test.mat',data)

where data is np array but got:

----> 1 scipy.io.savemat('test.mat',data)

/usr/lib/python2.7/dist-packages/scipy/io/matlab/mio.pyc in
savemat(file_name, mdict, appendmat, format, long_field_names,
do_compression, oned_as)
    233     else:
    234         raise ValueError("Format should be '4' or '5'")
--> 235     MW.put_variables(mdict)
    236     if file_is_string:
    237         file_stream.close()

/usr/lib/python2.7/dist-packages/scipy/io/matlab/mio5.pyc in
put_variables(self, mdict, write_header)
    823             self.write_file_header()
    824         self._matrix_writer = VarWriter5(self)
--> 825         for name, var in mdict.items():
    826             if name[0] == '_':
    827                 continue

AttributeError: 'numpy.ndarray' object has no attribute 'items'



Thanks,
Maria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141022/c64b9d8a/attachment.html 


More information about the Mne_analysis mailing list