[SciPy-dev] Ideas for scipy.sparse?

Robert Cimrman cimrman3 at ntc.zcu.cz
Mon Apr 14 04:11:32 EDT 2008


Hi Brian,

Brian Granger wrote:
> So, I am currently implementing a distributed memory array package for python:
> 
> http://projects.scipy.org/ipython/ipython/browser/ipythondistarray
> 
> The goal is to have distributed/parallel arrays that look and feel
> just like numpy arrays.  Here is an example:

Very nice!

> Obviously, my first though was scipy.sparse.  I am _really_ excited
> about the massive improvements that have been happening in this area
> recently.  Here are the problems I am running into:
> 
> 1) I need N-dimensional sparse arrays.  Some of the storage formats in
> scipy.sparse (dok, coo, maybe lil) could be generalized to
> N-dimensions, but some work would have to be done.
> 
> 2) I need these things to be in numpy.  I hate to start another
> "should this go into numpy or scipy" thread, but I actually do think
> there is a decent case for moving the core sparse arrays into numpy
> (not the solvers though).  Please hear me out:
> 
> a) Numpy at its core is about arrays.  Conceptually, sparse arrays fit
> into this narrow vision of Numpy.
> 
> b) Sparse arrays are just as foundational as dense arrays in many
> areas of computing/science (I would argue, that they are more
> foundational than ffts and random numbers).
> 
> c) Moving the core sparse arrays into numpy would increase their
> visibility and encourage other projects to rely on them.
> 
> d) It would not make numpy more difficult to build.
> 
> e) It is currently somewhat confusing that they are not in numpy
> (remember Numpy = arrays).

You can add f) Having sparse arrays in numpy would greatly improve 
unifying the two worlds. There have been tons of questions why this or 
that numpy function do not work for a sparse matrix, when in <plug in a 
popular commercial system> it works seamlessly.

Definitely +1!

r.



More information about the SciPy-Dev mailing list