[SciPy-User] Read matrix from matrix market format file

Roban Kramer robanhk@gmail....
Thu Jun 6 08:46:54 CDT 2013


Can you send the first few lines of the my_matrix.mtx file?


On Thu, Jun 6, 2013 at 9:05 AM, Valène Pellissier <
Valene.Pellissier@cedrat.com> wrote:

>  Hi, ****
>
> ** **
>
> I've got some problems reading a matrix  from a matrix market format file.
> ****
>
> I have Python 3.2 and installed Numpy 1.7.1, Scipy 0.12.0 and matplotlib
> 1.2.1 on Windows 64. ****
>
> I tried the scipy.io.mmread function but got an error I don't understand.
> ****
>
> ** **
>
> >>> B=scipy.io.mmread("my_matrix.mtx")****
>
> Traceback (most recent call last):****
>
>   File "<stdin>", line 1, in <module>****
>
>   File "C:\Python32\lib\site-packages\scipy\io\mmio.py", line 70, in mmread
> ****
>
>     return MMFile().read(source)****
>
>   File "C:\Python32\lib\site-packages\scipy\io\mmio.py", line 301, in read
> ****
>
>     self._parse_header(stream)****
>
>   File "C:\Python32\lib\site-packages\scipy\io\mmio.py", line 337, in
> _parse_he****
>
> der****
>
>     self.__class__.info(stream)****
>
>   File "C:\Python32\lib\site-packages\scipy\io\mmio.py", line 208, in info
> ****
>
>     raise ValueError("Header line not of length 3: " + line)****
>
> ** **
>
> It is a big matrix. ****
>
> Is there someone who has a clue about what I'm doing wrong ? ****
>
> ** **
>
> Your help will be much appreciated.****
>
> Thanks****
>
> Valene****
>
> ** **
>
> *****Valène PELLISSIER *- R&D Engineer
> *CEDRAT S.A.*
> 15 Chemin de Malacher - Inovallée - 38246 MEYLAN cedex - FRANCE
> Phone: +33 (0)4 76 90 50 45 - Fax: +33 (0)4 56 38 08 30****
>
> valene.pellissier@cedrat.com - www.cedrat.com [image: youtube]<http://www.youtube.com/user/CEDRATSOFTWARE><http://www.linkedin.com/company/cedrat?trk=tabs_biz_home>[image:
> youtube] <http://www.facebook.com/pages/CEDRAT/174895345915549?sk=wall>***
> *
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20130606/dc5be52c/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 1130 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20130606/dc5be52c/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 4777 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20130606/dc5be52c/attachment.jpe 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 1014 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20130606/dc5be52c/attachment-0001.png 


More information about the SciPy-User mailing list