1 | initial version |
The issue above is that geng
is being called with the arguments
n -c
each time. The value of n
should be substituted in the string. Here is a working version of the for loop you have.
for n in range(3,7):
count = 0
for g in graphs.nauty_geng("{0} -c".format(n)):
count += 1
print (n,count)
See here for more details on the format
function.
Other possible variations on the call to geng
above could also be:
graphs.nauty_geng("%d -c"%(n))
or
graphs.nauty_geng(str(n)+" -c")
2 | fixed indentation |
The issue above is that geng
is being called with the arguments
n -c
each time. The value of n
should be substituted in the string. Here is a working version of the for loop you have.
for n in range(3,7):
count = 0
for g in graphs.nauty_geng("{0} -c".format(n)):
count += 1
print (n,count)
See here for more details on the format
function.
Other possible variations on the call to geng
above could also be:
graphs.nauty_geng("%d -c"%(n))
or
graphs.nauty_geng(str(n)+" -c")