[SciPy-dev] Ideas for scipy.sparse?
Viral Shah
vshah@interactivesupercomputing....
Tue Apr 15 11:59:43 CDT 2008
> On Tue, Apr 15, 2008 at 1:55 AM, Nathan Bell <wnbell@gmail.com> wrote:
>> On Mon, Apr 14, 2008 at 1:36 PM, Viral Shah
>>> I thought initially that dok may solve this for some kinds of sparse
>>> matrix problems, but it seems that its too slow for large problems.
>>> Perhaps a little benchmark must be setup.
>>
>> In my experience DOK/LIL are too slow for large matrices. This is a
>> shame, because new users will want to construct matrices with one of
>> these classes. More advanced users would probably build a COO
>> initially and then convert to CSR/CSC.
>
> All formats are nicely documented in the sources (see the docstrings
> for usage examples).
Yes, in general they are well documented.
Perhaps it is a good idea to document the reverse process of
extracting indices from coo_matrix as well ? Currently, it only
provides a way to construct a matrix from indices and not the other
way around, which is equally useful, like Nathan said in the last email.
A = coo_matrix(A)
I,J,V = A.row,A.col,A.data
-viral
More information about the Scipy-dev
mailing list