diff options
Diffstat (limited to 'networkx/algorithms/dag.py')
-rw-r--r-- | networkx/algorithms/dag.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networkx/algorithms/dag.py b/networkx/algorithms/dag.py index f7692d1f..381f079c 100644 --- a/networkx/algorithms/dag.py +++ b/networkx/algorithms/dag.py @@ -36,7 +36,7 @@ __all__ = [ chaini = chain.from_iterable -@nx.dispatch("descendants") +@nx.dispatch def descendants(G, source): """Returns all nodes reachable from `source` in `G`. @@ -73,7 +73,7 @@ def descendants(G, source): return {child for parent, child in nx.bfs_edges(G, source)} -@nx.dispatch("ancestors") +@nx.dispatch def ancestors(G, source): """Returns all nodes having a path to `source` in `G`. |