提交 27605fae authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Rename theano.gof.graph.orphans to orphans_between

上级 d70c1cc6
......@@ -18,7 +18,7 @@ from theano.gof.graph import (
io_toposort,
is_in_ancestors,
list_of_nodes,
orphans,
orphans_between,
vars_between,
walk,
)
......@@ -406,7 +406,7 @@ def test_variables_and_orphans():
o2.name = "o2"
vars_res = vars_between([r1, r2], [o2])
orphans_res = orphans([r1, r2], [o2])
orphans_res = orphans_between([r1, r2], [o2])
vars_res_list = list(vars_res)
orphans_res_list = list(orphans_res)
......
......@@ -798,7 +798,7 @@ def vars_between(
`Variable`s
The `Variable`s that are involved in the subgraph that lies
between `ins` and `outs`. This includes `ins`, `outs`,
``orphans(ins, outs)`` and all values of all intermediary steps from
``orphans_between(ins, outs)`` and all values of all intermediary steps from
`ins` to `outs`.
"""
......@@ -810,7 +810,7 @@ def vars_between(
yield from walk(outs, expand)
def orphans(
def orphans_between(
ins: Collection[Variable], outs: Iterable[Variable]
) -> Generator[Variable, None, None]:
"""Extract the `Variable`s not within the sub-graph between input and output nodes.
......@@ -831,7 +831,7 @@ def orphans(
Examples
--------
>>> orphans([x], [(x+y).out])
>>> orphans_between([x], [(x+y).out])
[y]
"""
......@@ -1281,7 +1281,7 @@ def as_string(
"""
i = set(inputs)
orph = list(orphans(i, outputs))
orph = list(orphans_between(i, outputs))
multi = set()
seen = set()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论