Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

sparse rmatvec not working (Trac #462) #989

Closed
scipy-gitbot opened this Issue · 0 comments

1 participant

@scipy-gitbot

Original ticket http://projects.scipy.org/scipy/ticket/462 on 2007-07-10 by @hagberg, assigned to @wnbell.

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.]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.