diff --git a/nxpd/nx_pydot.py b/nxpd/nx_pydot.py index 1a98b8d..6ffca20 100644 --- a/nxpd/nx_pydot.py +++ b/nxpd/nx_pydot.py @@ -246,7 +246,7 @@ def to_pydot(G, raise_exceptions=True): else: graph_type = 'graph' - strict = G.number_of_selfloops() == 0 and not G.is_multigraph() + strict = nx.number_of_selfloops(G) == 0 and not G.is_multigraph() # Create the Pydot graph. name = G.graph.get('name') diff --git a/setup.py b/setup.py index 845ae94..bb4c9ef 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def main(): install_requires = [ - 'networkx >= 1.6', + 'networkx >= 2.0', 'pyparsing >= 2.0.1', ]