提交 8a16a167 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix type checking

上级 dcd62712
......@@ -516,7 +516,8 @@ class ScanSaveMem(gof.Optimizer):
if isinstance(stop, tensor.Variable):
global_nsteps['sym'] += [stop]
# not if it is maxsize
elif (type(stop) is int and stop == sys.maxsize):
elif (type(stop) in (int, long) and
stop == sys.maxsize):
global_nsteps = None
# yes if it is a int k, 0 < k < maxsize
elif (type(stop) in (int, long) and
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论