[Numpy-discussion] Graphs in numarray?

Magnus Lie Hetland magnus at hetland.org
Wed Apr 17 07:32:31 EDT 2002


I'm looking at various ways of implementing graphs in Python (beyond
simple dict-based stuff -- more performance is needed). kjbuckets
looks like a nice alternative, as does the Boost Graph Library (not
sure how easy it is to use with Boost.Python) but if numarray is to
become a part of the standard library, it could be beneficial to use
that...

For dense graphs, it makes sense to use an adjacency matrix directly
in numarray, I should think. (I haven't implemented many graph
algorithms with ufuncs yet, but it seems doable...) For sparse graphs
I guess some sort of sparse array implementation would be useful,
although the archives indicate that creating such a thing isn't a core
part of the numarray project.

What do you think -- is it reasonable to use numarray for graph
algorithms? Perhaps an additional module with standard graph
algorithms would be interesting? (I'm sure I could contribute some if
there is any interest...)

And -- is there any chance of getting sparse matrices in numarray?

--
Magnus Lie Hetland                                  The Anygui Project
http://hetland.org                                  http://anygui.org




More information about the NumPy-Discussion mailing list