[Scipy-tickets] [SciPy] #1163: Different type of output sparse/nonsparse depending on dimension of matrix

SciPy Trac scipy-tickets@scipy....
Thu Apr 22 04:57:40 CDT 2010


#1163: Different type of output sparse/nonsparse depending on dimension of matrix
------------------------------------------+---------------------------------
 Reporter:  fnielsen                      |       Owner:  somebody
     Type:  defect                        |      Status:  new     
 Priority:  normal                        |   Milestone:  0.8.0   
Component:  Other                         |     Version:  0.6.0   
 Keywords:  sparse, full, multiplication  |  
------------------------------------------+---------------------------------
 The result of the following code seems odd to me:

 {{{
 >>> from scipy import sparse
 >>> import numpy
 >>> A = sparse.lil_eye((10,10))
 >>> sparse.issparse(numpy.mat(numpy.ones((1,10))) * A)
 False
 >>> sparse.issparse(numpy.mat(numpy.ones((2,10))) * A)
 True
 }}}
 Depending on the dimension of the left full matrix the result of the
 multiplication is either a full or a sparse matrix.

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


More information about the Scipy-tickets mailing list