Warning

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

# degrees¶

degrees(B, nodes, weight=None)[source]

Return the degrees of the two node sets in the bipartite graph B.

Parameters : G : NetworkX graph nodes: list or container Nodes in one set of the bipartite graph. weight : string or None, optional (default=None) The edge attribute that holds the numerical value used as a weight. If None, then each edge has weight 1. The degree is the sum of the edge weights adjacent to the node. (degX,degY) : tuple of dictionaries The degrees of the two bipartite sets as dictionaries keyed by node.

>>> from networkx.algorithms import bipartite