flip#

flip(k, nodes=None, inplace=False)#

Flip the diagram by 180° around each selected node.

This reverses the cyclic order of incident endpoints at the specified nodes. In S³ / ℝ³ this does not change the knot type or planar diagram type.

Parameters:
  • k (PlanarDiagram | OrientedPlanarDiagram) – Diagram to flip.

  • nodes (set | list | tuple | None) – Optional container of node labels to flip. If None, all nodes are flipped.

  • inplace (bool) – If True, modify k in place, otherwise return a copy.

Returns:

The flipped diagram (k if inplace=True; otherwise a new instance).