Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

in_edges_iter

DiGraph.in_edges_iter(nbunch=None, data=False)[source]

Return an iterator over the incoming edges.

Parameters:
  • nbunch (iterable container, optional (default= all nodes)) – A container of nodes. The container will be iterated through once.
  • data (bool, optional (default=False)) – If True, return edge attribute dict in 3-tuple (u,v,data).
Returns:

in_edge_iter – An iterator of (u,v) or (u,v,d) tuples of incoming edges.

Return type:

iterator

See also

edges_iter()
return an iterator of edges