Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
scipy-gitbot opened this Issue · 2 comments

2 participants

@scipy-gitbot

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

trac user nich2o wrote on 2010-03-02

Up?

@pv
Owner
pv commented

Works correctly in current master.

@pv pv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.