Warning

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

networkx.classes.function.degree

degree(G, nbunch=None, weight=None)[source]

Return a degree view of single node or of nbunch of nodes. If nbunch is ommitted, then return degrees of all nodes.