提交 573e0f78 authored 作者: Ricardo Vieira's avatar Ricardo Vieira 提交者: Ricardo Vieira

Better docstrings for `set` and `add` helpers

上级 9d5a8256
......@@ -816,7 +816,9 @@ class _tensor_py_operators:
return at.extra_ops.compress(self, a, axis=axis)
def set(self, y, **kwargs):
"""Set values to y, where y is the output of an index operation.
"""Return a copy of a tensor with the indexed values set to y.
Self must be the output of an indexing operation.
Equivalent to set_subtensor(self, y). See docstrings for kwargs.
......@@ -829,9 +831,11 @@ class _tensor_py_operators:
return at.subtensor.set_subtensor(self, y, **kwargs)
def add(self, y, **kwargs):
"""Add values to y, where y is the output of an index operation.
"""Return a copy of a tensor with the indexed values incremented by y.
Self must be the output of an indexing operation.
Equivalent to inc_subtensor(self, y). See docstrings for kwargs
Equivalent to inc_subtensor(self, y). See docstrings for kwargs.
Examples
--------
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论