提交 d0509f8e authored 作者: Razvan Pascanu's avatar Razvan Pascanu

Removed useless constraint

Note that the code was written with f being a variable or a list of variable in mind (the documentation says so, and we even convert f into a list right after the assert).
上级 7b943a5b
...@@ -347,10 +347,6 @@ def Lop(f, wrt, eval_points, consider_constant=None, warn_type=False, ...@@ -347,10 +347,6 @@ def Lop(f, wrt, eval_points, consider_constant=None, warn_type=False,
if consider_constant is None: if consider_constant is None:
consider_constant = [] consider_constant = []
if not isinstance(f, Variable):
raise TypeError(('In Lop(), cost argument should be '
'a Variable.'), f)
if type(eval_points) not in (list, tuple): if type(eval_points) not in (list, tuple):
eval_points = [eval_points] eval_points = [eval_points]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论