[SciPy-user] Re: io.loadmat: broken?
Yichun Wei
yichunwe at usc.edu
Tue Jan 11 18:09:30 EST 2005
Here is the file (I should have said that it is a .mat file saved using
-v6 option of Matlab 7):
>> a = 1; save -v6 a.mat a
>> clear
>> load a.mat
>> a
a =
1
The Enthought python with Scipy 0.3 loads this .mat file fine, however,
it is not the case with Scipy 0.3.2:
>>> a = io.loadmat('a')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python23\Lib\site-packages\scipy\io\mio.py", line 692, in
loadmat
thisdict = _loadv5(fid,basename)
File "C:\Python23\Lib\site-packages\scipy\io\mio.py", line 631, in
_loadv5
el, varname = _get_element(fid)
File "C:\Python23\Lib\site-packages\scipy\io\mio.py", line 619, in
_get_elemen
t
el, name = _parse_mimatrix(fid,numbytes)
File "C:\Python23\Lib\site-packages\scipy\io\mio.py", line 510, in
_parse_mima
trix
result = squeeze(transpose(reshape(result,dims[::-1])))
TypeError: Array can not be safely cast to required type
>>> import scipy
>>> scipy.__version__
'0.3.2_280.4176'
>>>
>>> import Numeric
>>> Numeric.__version__
'23.6'
I am not sure if this is brought by the new Numeric used here. This is
on a Win2k. I am not sure if it is the case on other platforms.
> Could you attach the test file so that I can debug the problem?
>
> Thanks,
> -Travis
Thanks for looking into this issue! I'm looking forward to use Scipy
0.3.2 so as to be able to work with wxpython 2.5.x.x, pythoncard etc...
regards,
yichun
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.mat
Type: application/octet-stream
Size: 184 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20050111/58a83995/attachment.obj>
More information about the SciPy-User
mailing list