networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersRaisesReturnsBackRef
nbunch_iter(self, nbunch=None)

The nodes in nbunch are checked for membership in the graph and if not are silently ignored.

Notes

When nbunch is an iterator, the returned iterator yields values directly from nbunch, becoming exhausted when nbunch is exhausted.

To test whether nbunch is a single node, one can use "if nbunch in self:", even after processing with this routine.

If nbunch is not a node or a (possibly empty) sequence/iterator or None, a NetworkXError is raised. Also, if any object in nbunch is not hashable, a NetworkXError is raised.

Parameters

nbunch : single node, container, or all nodes (default= all nodes)

The view will only report edges incident to these nodes.

Raises

NetworkXError

If nbunch is not a node or sequence of nodes. If a node in nbunch is not hashable.

Returns

niter : iterator

An iterator over nodes in nbunch that are also in the graph. If nbunch is None, iterate over all nodes in the graph.

Returns an iterator over nodes contained in nbunch that are also in the graph.

See Also

Graph.__iter__

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

networkx.classes.reportviews.EdgeDataView networkx.algorithms.dominating.is_dominating_set networkx.classes.reportviews.DegreeView networkx.classes.reportviews.EdgeView networkx.algorithms.boundary.edge_boundary networkx.classes.reportviews.OutEdgeView.data networkx.algorithms.boundary.node_boundary networkx.classes.reportviews

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/classes/graph.py#1860
type: <class 'function'>
Commit: