提交 9fbf2f61 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

fix to annoying error message

上级 202eed7f
...@@ -262,7 +262,9 @@ def scan(fn, ...@@ -262,7 +262,9 @@ def scan(fn,
# makes code much cleaner for those who do not use taps. Otherwise # makes code much cleaner for those who do not use taps. Otherwise
# they would always had to shape_padleft the initial state .. # they would always had to shape_padleft the initial state ..
# which is ugly # which is ugly
if init_out['taps'] == [-1]:
# Note, 'taps' might not be in the dictionary
if 'taps' in init_out and init_out['taps'] == [-1]:
actual_arg = init_out['membuf'] actual_arg = init_out['membuf']
arg = safe_new(init_out['membuf'][0]) arg = safe_new(init_out['membuf'][0])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论