提交 dce1d289 authored 作者: Frederic's avatar Frederic

fix/update comment/docstring.

上级 1f79dbf1
......@@ -1665,7 +1665,7 @@ class CAReduceDtype(CAReduce):
def __init__(self, scalar_op, axis=None, dtype=None, acc_dtype=None):
"""
Usage: CAReduceDtype(scalar_op, axis=None, dtype=None)
Usage: CAReduceDtype(scalar_op, axis=None, dtype=None, acc_dtype=None)
:param scalar_op: a binary scalar op with only one output.
It must be commutative and associative.
......
......@@ -2789,9 +2789,9 @@ class Canonizer(gof.LocalOptimizer):
pairs = [self.get_num_denum(input2) for input2 in parent.inputs]
if parent.op == self.main:
# If we have main(x, y), numx, denumx, numy and denumy
# then num is concat(numx, numy) and denum is
# concat(denumx, denumy) note that main() can have any
# If we have main(x, y, ...), numx, denumx, numy, denumy, ...
# then num is concat(numx, numy, num...) and denum is
# concat(denumx, denumy, denum...) note that main() can have any
# number of arguments >= 0 concat is list concatenation
num = reduce(list.__iadd__, map(operator.itemgetter(0), pairs))
denum = reduce(list.__iadd__, map(operator.itemgetter(1), pairs))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论