提交 6a7d9ec9 authored 作者: James Bergstra's avatar James Bergstra

Added note about return type to docstring in shared value

上级 d221605f
......@@ -100,6 +100,9 @@ class SharedVariable(Variable):
:param update: the new value for this shared variable when updated by a pfunc.
:returns: a Variable whose value will be assigned to this SharedVariable by a pfunc.
:note: The return value of this function must match the self.type, or else pfunc()
will raise a TypeError.
"""
if not isinstance(update, Variable):
# The value for the update is not a Variable: we cast it into
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论