[SciPy-user] Sparse matrix todense

Nathan Bell wnbell at gmail.com
Thu Apr 24 18:33:24 EDT 2008


On Thu, Apr 24, 2008 at 5:18 PM, Dinesh B Vadhia
<dineshbvadhia at 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 at gmail.com
http://graphics.cs.uiuc.edu/~wnbell/



More information about the SciPy-User mailing list