Subgraph Drawing
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Sun Jan 13 19:35:49 EST 2013
On Sun, 13 Jan 2013 12:05:54 -0800, subhabangalore wrote:
> Dear Group,
>
> I have two questions, if I take a subseries of the matrix as in
> eigenvalue here, provided I have one graph of the full form in G, how
> may I show it, as if I do the nx.draw(G) it takes only the original
> graph.
Is this what you mean? If not, you will have to explain your question
better.
L = = nx.laplacian(G)
E = numpy.linalg.eigvals(L)
nx.draw(E)
> >>> print numpy.linalg.eigvals(L)
> [ 8.00000000e+00 2.22044605e-16 1.00000000e+00 1.00000000e+00
> 1.00000000e+00 1.00000000e+00 1.00000000e+00 1.00000000e+00]
> for more than 1000 nodes it is coming too slow on Windows 7 machine with
> 3GB RAM.
Get a faster machine. Or use fewer nodes. Or be patient and wait.
Solving a graph problem with 1000 nodes is a fairly big problem for a
desktop PC. It will take time. Calculations don't just happen instantly,
the more work you have to do the longer they take.
The last alternative is to ask on a specialist numpy list. But I expect
they will probably tell you the same thing.
--
Steven
More information about the Python-list
mailing list