提交 5ae2a05f authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Python 2.4 compatibility fix

上级 03121837
...@@ -331,7 +331,10 @@ class ConvolutionIndices(Op): ...@@ -331,7 +331,10 @@ class ConvolutionIndices(Op):
# size of output image if doing proper convolution (mode='full',dx=dy=0) # size of output image if doing proper convolution (mode='full',dx=dy=0)
# outshp is the actual output shape given the parameters # outshp is the actual output shape given the parameters
fulloutshp = inshp[1:] + kshp - 1 fulloutshp = inshp[1:] + kshp - 1
s = -1 if mode=='valid' else 1 if mode == 'valid':
s = -1
else:
s = 1
outshp = N.int64(N.ceil((inshp[1:] + s*kshp - s*1) \ outshp = N.int64(N.ceil((inshp[1:] + s*kshp - s*1) \
/N.array([dy,dx], dtype='float'))) /N.array([dy,dx], dtype='float')))
if any(outshp <= 0): if any(outshp <= 0):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论