Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupted data when using io.loadmat with format='5' and an array of strings. (Trac #1090) #1617

Closed
scipy-gitbot opened this issue Apr 25, 2013 · 2 comments
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected Migrated from Trac scipy.io
Milestone

Comments

@scipy-gitbot
Copy link

Original ticket http://projects.scipy.org/scipy/ticket/1090 on 2010-01-14 by trac user npinto, assigned to unknown.

Using 0.7.1 I'm getting:

In [12]: from scipy import io

In [13]: d = {'str':['test','test2','test34']}

In [14]: io.savemat('bug', d, format='4'); io.loadmat('bug')
Out[14]: 
{'__globals__': [],
 'str': array([u'test', u'test2', u'test34'], 
      dtype='<U6')}

In [15]: io.savemat('bug', d, format='5'); io.loadmat('bug')
Out[15]: 
{'__globals__': [],
 '__header__': 'MATLAB 5.0 MAT-file Platform: posix, Created on: Thu Jan 14 14:15:11 2010',
 '__version__': '1.0',
 'str': array([u'tttttt', u'e\x00e2e3', u's\x00s\x00s4'], 
      dtype='<U6')}
@scipy-gitbot
Copy link
Author

trac user nich2o wrote on 2010-03-02

Up?

@pv
Copy link
Member

pv commented Sep 19, 2013

Works correctly in current master.

@pv pv closed this as completed Sep 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected Migrated from Trac scipy.io
Projects
None yet
Development

No branches or pull requests

2 participants