Which sparse matrix package?
robert.kern at gmail.com
Fri Dec 19 01:04:19 CET 2008
Martin Manns wrote:
> Should I use another type of matrix in scipy.sparse? If yes which?
If you have a benchmark, you might just want to try all of them. Should be just
a matter of a small script. Block Sparse Row (bsr_matrix) might be the most
appropriate in terms of data structure, but it appears that a bunch of stuff
important for your use case is unimplemented.
> Does a different data-structure suit my above-stated needs better?
Something similar to a quadtree might be more suitable. That should let you do
queries along both dimensions easily. You probably don't want exactly a
quadtree, though; it's good for scattered points, but probably not for largish
blocks of points on a precise grid, which you will probably see frequently in a
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list