[Scipy-tickets] [SciPy] #514: matvec doesn't preserve array dimensions

SciPy scipy-tickets@scipy....
Thu Oct 11 15:13:57 CDT 2007


#514: matvec doesn't preserve array dimensions
--------------------------+-------------------------------------------------
 Reporter:  wnbell        |       Owner:  somebody
     Type:  defect        |      Status:  new     
 Priority:  normal        |   Milestone:  0.7     
Component:  scipy.sparse  |     Version:          
 Severity:  normal        |    Keywords:          
--------------------------+-------------------------------------------------
 the matvec (A*x) routine of sparse shows an inconsistency: the shape of
 the returned vector is not the same as the vector x when shape==(n,1). A
 simple change in the _matvec routines in sparse.py should do the trick...


 {{{
 #!python
 import scipy as SY
 import scipy.sparse as SP

 A = SP.spidentity(10)

 x = SY.ones((10,1))
 y = A*x
 # returns (10,)
 print y.shape

 x = SY.ones((10,2))
 y = A*x
 # returns (10,2)
 print y.shape
 }}}

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


More information about the Scipy-tickets mailing list