提交 eca146f4 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Update error message.

0 or 1 are not converted to boolean types if that is what the user would want.
上级 07fa43dc
......@@ -181,8 +181,9 @@ def as_tensor_variable(x, name=None, ndim=None):
if isinstance(x, bool):
raise AsTensorError(
"Cannot cast True or False as a tensor variable. Please use 1 or "
"0. This error might be caused by using the == operator on "
"Cannot cast True or False as a tensor variable. Please use "
"np.array(True) or np.array(False) if you need these constants. "
"This error might be caused by using the == operator on "
"Variables. v == w does not do what you think it does, "
"use theano.tensor.eq(v, w) instead.")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论