提交 872f34a3 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Remove line continuations.

上级 f0a58c50
...@@ -470,8 +470,8 @@ class _tensor_py_operators(object): ...@@ -470,8 +470,8 @@ class _tensor_py_operators(object):
def check_bool(args_el): def check_bool(args_el):
try: try:
if isinstance(args_el, (numpy.bool_, bool)) or \ if (isinstance(args_el, (numpy.bool_, bool)) or
args_el.dtype == 'bool': args_el.dtype == 'bool'):
raise TypeError('TensorType does not support boolean ' raise TypeError('TensorType does not support boolean '
'mask for indexing such as tensor[x==0]. ' 'mask for indexing such as tensor[x==0]. '
'Instead you can use non_zeros() such as ' 'Instead you can use non_zeros() such as '
...@@ -479,8 +479,8 @@ class _tensor_py_operators(object): ...@@ -479,8 +479,8 @@ class _tensor_py_operators(object):
except AttributeError: except AttributeError:
pass pass
if not isinstance(args_el, theano.tensor.Variable) and \ if (not isinstance(args_el, theano.tensor.Variable) and
isinstance(args_el, collections.Iterable): isinstance(args_el, collections.Iterable)):
for el in args_el: for el in args_el:
check_bool(el) check_bool(el)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论