summaryrefslogtreecommitdiff
path: root/networkx/classes/function.py
diff options
context:
space:
mode:
Diffstat (limited to 'networkx/classes/function.py')
-rw-r--r--networkx/classes/function.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/networkx/classes/function.py b/networkx/classes/function.py
index 4ae7d45e..7476578b 100644
--- a/networkx/classes/function.py
+++ b/networkx/classes/function.py
@@ -15,7 +15,7 @@ __author__ = """\n""".join(['Aric Hagberg (hagberg@lanl.gov)',
'Dan Schult(dschult@colgate.edu)'])
__all__ = ['nodes', 'edges', 'degree', 'degree_histogram', 'neighbors',
'number_of_nodes', 'number_of_edges', 'density',
- 'nodes_iter', 'edges_iter', 'is_directed','info',
+ 'edges_iter', 'is_directed','info',
'freeze','is_frozen','subgraph','create_empty_copy',
'set_node_attributes','get_node_attributes',
'set_edge_attributes','get_edge_attributes',
@@ -25,13 +25,8 @@ __all__ = ['nodes', 'edges', 'degree', 'degree_histogram', 'neighbors',
def nodes(G):
- """Return a copy of the graph nodes in a list."""
- return G.nodes()
-
-
-def nodes_iter(G):
"""Return an iterator over the graph nodes."""
- return G.nodes_iter()
+ return G.nodes()
def edges(G,nbunch=None):
@@ -495,7 +490,7 @@ def non_edges(graph):
Iterator of edges that are not in the graph.
"""
if graph.is_directed():
- for u in graph.nodes_iter():
+ for u in graph.nodes():
for v in non_neighbors(graph, u):
yield (u, v)
else: