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

Broken: scipy.io.mmread with scipy.sparse.lil_matrix (Trac #883) #1410

Closed
scipy-gitbot opened this issue Apr 25, 2013 · 2 comments
Closed

Broken: scipy.io.mmread with scipy.sparse.lil_matrix (Trac #883) #1410

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/883 on 2009-03-08 by trac user kyleabeauchamp, assigned to @wnbell.

version scipy 0.7.0 (can't select this version in the drop down box)
IMHO, this should be a relatively simple fix; I believe that scipy.io.mmread just needs a bit more error checking for matrix sizes.

Problem: when you initialize an empty lil_matrix, write it to disk using mmwrite, and read it back in from disk, scipy crashes with

*** glibc detected *** /usr/bin/python: double free or corruption (top): 0x09e113a8 ***

Sample code causing the problem:

In [1]: import scipy.io

In [2]: import scipy.sparse

In [3]: A=scipy.sparse.lil_matrix((100,100))

In [4]: scipy.io.mmwrite("Broken.mtx",A)

In [5]: scipy.io.mmread("Broken.mtx")
*** glibc detected *** /usr/bin/python: double free or corruption (top): 0x09e113a8 ***

Here is the file Broken.mtx:

kyle@kyle-laptop:/opt$ cat Broken.mtx 
%%MatrixMarket matrix coordinate real general
%
100 100 0
@scipy-gitbot
Copy link
Author

Milestone changed to 0.7.1 by @wnbell on 2009-03-08

@scipy-gitbot
Copy link
Author

@wnbell wrote on 2009-03-08

Thanks for the report Kyle. This has been fixed in 9cc779d and should appear in SciPy 0.7.1.

Also, you can now report bugs against version 0.7.0.

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

1 participant