[Nauty] simple python interface

Pieter Eendebak pieter.eendebak at gmail.com
Tue Feb 16 11:00:50 AEDT 2016


Hi all,

Last November I asked about a Python interface to nauty. There was a reply
from Gregory Puleo with an interface using cython (
https://bitbucket.org/gpuleo/cytonaut).

Cython was not an option for me, so I wrote my own simple interface. It is
included in the OApackage (available on pypi). Example code:

# define some graph and colors
G= np.zeros( (5,5), dtype=int); G[0,1]=G[0,2]=G[0,3]=G[1,3]=1
colors = [0,0,0,1,1]

tr = oapackage.reduceGraphNauty(G, colors=colors, verbose=2)
Gx=oapackage.transformGraphMatrix(G, tr)

With kind regards,
Pieter Eendebak


More information about the Nauty mailing list