[SciPy-dev] Sparse matrix indexing.

Nathan Bell wnbell at gmail.com
Sun Apr 6 23:35:27 EDT 2008


On Sun, Apr 6, 2008 at 10:22 PM, Viral Shah
<vshah at interactivesupercomputing.com> wrote:

>  I did come across this on scipy-dev, but it seems like it works for
>  only CSR ?
>  http://article.gmane.org/gmane.comp.python.scientific.devel/6702/match=sparse+indexing

Viral, thanks for your interest in scipy.sparse.  Both csr_matrix and
csc_matrix now support fancy indexing (in the current developer's
version).

http://article.gmane.org/gmane.comp.python.scientific.devel/7392

FWIW the internals of csr_matrix.__getitem__ use an approach similar
to you subsref() function, so their efficiency should be comparable.

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



More information about the SciPy-Dev mailing list