[Scipy-tickets] [SciPy] #1166: sparse (lil) crashed with ValueError after assignment

SciPy Trac scipy-tickets@scipy....
Sun Apr 25 12:16:47 CDT 2010


#1166: sparse (lil) crashed with ValueError after assignment
-----------------------+----------------------------------------------------
 Reporter:  dktrkranz  |       Owner:  somebody
     Type:  defect     |      Status:  new     
 Priority:  normal     |   Milestone:  0.7.2   
Component:  Other      |     Version:  0.7.0   
 Keywords:             |  
-----------------------+----------------------------------------------------
 Forwarded from http://bugs.debian.org/579041

 The following code
 {{{
 from scipy import sparse
 a = sparse.lil_matrix((10,10))
 a[:,2] = 1 # Works
 a[4,:] = 3 # Fails

 }}}

 generates this traceback:

 {{{
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/lib/python2.5/site-packages/scipy/sparse/lil.py", line 313,
 in __setitem__
     self._insertat3(row, data, j, x)
   File "/usr/lib/python2.5/site-packages/scipy/sparse/lil.py", line 279,
 in _insertat3
     self._insertat2(row, data, jj, x)
   File "/usr/lib/python2.5/site-packages/scipy/sparse/lil.py", line 246,
 in _insertat2
     raise ValueError('setting an array element with a sequence')
 ValueError: setting an array element with a sequence
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1166>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list