[SciPy-user] Sparse matrix todense

Nathan Bell wnbell@gmail....
Thu Apr 24 17:33:24 CDT 2008


On Thu, Apr 24, 2008 at 5:18 PM, Dinesh B Vadhia
<dineshbvadhia@hotmail.com> wrote:
>
>
> Hi!  The following code worked until I installed the latest svn.  I want to
> select a particular row (eg. row=1818) from the sparse matrix A:
>
> > q[0,:] = sparse.csr_matrix.todense(sparse.csr_matrix.getrow(A, 1818))

That's definitely a bug in getrow().  I'll fix it soon.

Note that with the latest SVN you can do q[0,:] = A[1818,:].todense().
 In other words, sparse slicing works correctly for CSR and CSC
matrices now.

-- 
Nathan Bell wnbell@gmail.com
http://graphics.cs.uiuc.edu/~wnbell/


More information about the SciPy-user mailing list