Perfect. Thanks.
Nic
"Peter Otten" <[EMAIL PROTECTED]> ha scritto nel messaggio
news:[EMAIL PROTECTED]
> Nic wrote:
>
>> The only problem is that from:
>> 12
>> 22
>> 21
>> In spite of writing
>> 12 12 22
>> it writes
>> 12 21 22
>> Do you know how is it possible to delete also this last trouble?
Nic wrote:
> The only problem is that from:
> 12
> 22
> 21
> In spite of writing
> 12 12 22
> it writes
> 12 21 22
> Do you know how is it possible to delete also this last trouble?
I thought that the two 12 were a typo, but it seems you want to reorder the
nodes inside an edge, too. Here's a fix
Many thanks.
Both the cases are OK.
The only problem is that from:
12
22
21
In spite of writing
12 12 22
it writes
12 21 22
Do you know how is it possible to delete also this last trouble?
Thanks a bunch,
Nic
"Peter Otten" <[EMAIL PROTECTED]> ha scritto nel messaggio
news:[EMAIL PROTECTED]
> Nic
Nic wrote:
> I tried to insert and execute the code, but the following error happens:
>
> Traceback (most recent call last):
> File "grafodna.py", line 10, in ?
> edges.sort(key = lambda u, v: (ddeg(u), ddeg(v)))
> TypeError: () takes exactly 2 arguments (1 given)
>
> Do you know how is it
Hello Miki,
Many thanks for the support.
I tried to insert and execute the code, but the following error happens:
Traceback (most recent call last):
File "grafodna.py", line 10, in ?
edges.sort(key = lambda u, v: (ddeg(u), ddeg(v)))
TypeError: () takes exactly 2 arguments (1 given)
Do you
Hello,
I'm using the NetworkX Python package (https://networkx.lanl.gov/).
Through this package I wrote the following code:
import networkx as NX
G=NX.Graph()
G.add_edge(1,2)
G.add_edge(2,3)
G.add_edge(3,4)
ddeg=G.degree(with_labels=True)
for (u,v) in G.edges():
print ddeg[u],ddeg[v]
As resul