提交 6a31132d authored 作者: Frederic Bastien's avatar Frederic Bastien

added a check for good parameter.

上级 b9d65703
...@@ -81,6 +81,9 @@ def pfunc(params, outputs=None, mode=None, updates=[], givens=[]): ...@@ -81,6 +81,9 @@ def pfunc(params, outputs=None, mode=None, updates=[], givens=[]):
# from the inputs and the givens. # from the inputs and the givens.
# #
if not isinstance(params,(list,tuple)):
raise Exception("in pfunc() the first argument must be a list or a tuple")
# initialize the clone_d mapping with the `givens` argument # initialize the clone_d mapping with the `givens` argument
clone_d = {} clone_d = {}
def v_clone(v): def v_clone(v):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论