finesse.utilities.graph.remove_sinks

finesse.utilities.graph.remove_sinks(G, recursive=True, inplace=False)[source]

Removes nodes with out degree 0 from graph G.

Sometimes removing a out degree 0 node creates a new out degree 0 node. So it is necessary to remove out degree 0 nodes recursively.