[Scipy-tickets] [SciPy] #462: sparse rmatvec not working

SciPy scipy-tickets@scipy....
Mon Jul 9 19:38:56 CDT 2007


#462: sparse rmatvec not working
--------------------+-------------------------------------------------------
 Reporter:  aric    |       Owner:  somebody     
     Type:  defect  |      Status:  new          
 Priority:  normal  |   Milestone:  0.5.3 Release
Component:  Other   |     Version:  devel        
 Severity:  normal  |    Keywords:               
--------------------+-------------------------------------------------------
 The sparse rmatvec seems to be just matvec.
 This worked in the last release.
 {{{
 In [1]: import scipy.sparse

 In [2]: scipy.__version__
 Out[2]: '0.5.3.dev3155'

 In [3]: S=scipy.sparse.lil_matrix([[1,1],[0,0]])

 In [4]: x=scipy.ones(2)

 In [5]: print S
   (0, 0)        1.0
   (0, 1)        1.0

 In [6]: x
 Out[6]: array([ 1.,  1.])

 In [7]: S.matvec(x)
 Out[7]: array([ 2.,  0.])

 In [8]: S.rmatvec(x) # should be [1, 1]
 Out[8]: array([ 2.,  0.])

 In [9]: D=S.todense()

 In [10]: D
 Out[10]:
 matrix([[ 1.,  1.],
         [ 0.,  0.]])

 In [11]: scipy.dot(x,D)
 Out[11]: matrix([[ 1.,  1.]])

 }}}

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


More information about the Scipy-tickets mailing list