Re: no GraphMatcher after installing networkx 1.7

30 views
Skip to first unread message

CE

unread,
Aug 1, 2012, 3:21:30 AM8/1/12
to networkx...@googlegroups.com
On Friday, July 27, 2012 8:30:14 AM UTC-7, Yuan wrote:
Hi,

I noticed this problem because python starts to complain about 
AttributeError: 'module' object has no attribute 'GraphMatcher'

and a inspection of the networkx module content revealed:
>>> for name, obj in inspect.getmembers(nx):
        if inspect.isclass(obj):
            print obj


Hi Yuan,

The GraphMatcher class is not imported into the main NetworkX namespace.  The thought was that most people would be fine making use of nx.is_isomorphic().  For more advanced use cases, the GraphMatcher class can be accessed in the isomorphism submodule:

    networkx.algorithms.isomorphism.GraphMatcher

Hope that helps,
Chris
Reply all
Reply to author
Forward
0 new messages