graphical_models.classes.dags.dag.DAG.remove_arc
- DAG.remove_arc(i: Hashable, j: Hashable, ignore_error=False)[source]
Remove the arc
i
->j
.- Parameters
i – source of arc to be removed.
j – target of arc to be removed.
ignore_error – if True, ignore the KeyError raised when arc is not in the DAG.
Examples
>>> from graphical_models import DAG >>> g = DAG(arcs={(1, 2)}) >>> g.remove_arc(1, 2) >>> g.arcs set()