clear_node_attributes#

clear_node_attributes(k, attr=None)#

Clear node attributes of the planar diagram k, or the list of planar diagrams k.

This function operates in-place to remove specified attributes from nodes in a given object or collection of objects. If the collection is a list, set, or tuple, the function is applied recursively to each object within the collection. If the attr parameter is not specified, all attributes of the nodes are cleared.

Args:
k (Union[PlanarDiagram, List[PlanarDiagram], Set[PlanarDiagram]]):

The object or a collection of objects whose node attributes are to be cleared.

attr (Optional[Union[List, Set, Tuple, str]]): The attribute(s) to

remove. Can be a single attribute (str), or a collection of attributes (list, set, or tuple). If None, all attributes will be cleared.