finesse.utilities.graph.remove_sources

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

Removes nodes with in degree 0 from graph G.

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