#

Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

#

networkx.generators.degree_seq.degree_sequence_tree

degree_sequence_tree(deg_sequence, create_using=None)[source]

Make a tree for the given degree sequence.

A tree has #nodes-#edges=1 so the degree sequence must have len(deg_sequence)-sum(deg_sequence)/2=1