[SciPy-user] Sparse Compilation Issues (again)

Costas Malamas costasm at hotmail.com
Thu Dec 19 16:39:58 EST 2002


>Ahh.  You want something else then.  Sparse is not a sparse array, it is
>only a sparse matrix.   Sparse matrices have been well studied and there
>are many good storage mechanisms and algorithms using them.
>
>Sparse arrays, on the other hand are usually just implemented as
>dictionaries.   I know of no sparse array implementation for any
>array-oriented environment.  You could make your own without too much
>difficulty, supporting just the operations you care about.
>
>Which operations do you want to do on these "sparse arrays"?
>
Well, pretty much everything NumPy supplies --array arithmetic and inner 
products at least.  I am looking for a quick way to a prototype, a cleaner 
solution will have to wait.

I did find a pure-python implementation of just what you described: 
dict-based sparse array, but I doubt that a python dictionary could handle 
1e9 members in a reasonable amount of time.

I took a look at NumPy's arrayobject.c; as I said, my C is rusty but it 
looks simple enough to create a default-value array that "looks" like a 
NumPy array...

Thanks again,

Costas


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail




More information about the SciPy-User mailing list