PlanarEmbedding.remove_nodes_from#
- PlanarEmbedding.remove_nodes_from(nodes)[source]#
Remove multiple nodes.
- Parameters:
- nodesiterable container
A container of nodes (list, dict, set, etc.). If a node in the container is not in the graph it is silently ignored.
See also
Notes
When removing nodes from an iterator over the graph you are changing, a
RuntimeError
will be raised with message:RuntimeError: dictionary changed size during iteration
. This happens when the graph’s underlying dictionary is modified during iteration. To avoid this error, evaluate the iterator into a separate object, e.g. by usinglist(iterator_of_nodes)
, and pass this object toG.remove_nodes_from
.