提交 be385cd0 authored 作者: nouiz's avatar nouiz

Merge pull request #525 from lamblin/remove_maxint

Remove use of sys.maxint in slices.
...@@ -3295,7 +3295,7 @@ class Subtensor(Op): ...@@ -3295,7 +3295,7 @@ class Subtensor(Op):
#infer the broadcasting pattern #infer the broadcasting pattern
padded = (idx_list padded = (idx_list
+ [slice(0,sys.maxint,1)] * (x.type.ndim - len(idx_list))) + [slice(None, None, None)] * (x.type.ndim - len(idx_list)))
broadcastable = [bc for p, bc in zip(padded, x.type.broadcastable) broadcastable = [bc for p, bc in zip(padded, x.type.broadcastable)
if isinstance(p, slice)] if isinstance(p, slice)]
...@@ -3851,7 +3851,7 @@ class IncSubtensor(Op): ...@@ -3851,7 +3851,7 @@ class IncSubtensor(Op):
#infer the broadcasting pattern #infer the broadcasting pattern
padded = (idx_list padded = (idx_list
+ [slice(0,sys.maxint,1)] * (x.type.ndim - len(idx_list))) + [slice(None, None, None)] * (x.type.ndim - len(idx_list)))
broadcastable = [bc for p, bc in zip(padded, x.type.broadcastable) broadcastable = [bc for p, bc in zip(padded, x.type.broadcastable)
if isinstance(p, slice)] if isinstance(p, slice)]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论