[Numpy-discussion] Fast decrementation of indices

Daπid davidmenhur at gmail.com
Mon Feb 3 04:04:49 EST 2014

On 2 February 2014 20:58, Mads Ipsen <mads.ipsen at gmail.com> wrote:

> ie. bond 0 connects atoms 0 and 5, bond 1 connects atom 0 and 6, etc. In
> practical examples, the list can be much larger (N > 100.000 connections.

Perhaps you should consider an alternative approach. You could consider it
a graph, and you could use Networkx or Scipy to work with them (provided it
actually works well with the rest of your problem)

In the case of Scipy, the graph is described by its adjacency matrix, and
you just want to delete a row and a column.

But, in any case, not knowing at all what is your overall project,
renumbering nodes is not something one has to usually do when working with
graphs, except for final results. The labels are that, labels, with no
further meaning.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140203/b1c97fe0/attachment.html>

More information about the NumPy-Discussion mailing list