提交 3724b551 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fix for python2.4 compatibility

上级 58398206
......@@ -60,8 +60,10 @@ class TestSP(unittest.TestCase):
filtersflipped[k,i,j] = it.next()
# compute output with convolve2d
fulloutshp = N.array(imshp) - N.array(kshp) + 1 if conv_mode=='valid'\
else N.array(imshp) + N.array(kshp) - 1
if conv_mode=='valid':
fulloutshp = N.array(imshp) - N.array(kshp) + 1
else:
fulloutshp = N.array(imshp) + N.array(kshp) - 1
ntime1 = time.time()
refout = N.zeros((bsize,)+tuple(fulloutshp)+(nkern,))
for b in range(bsize):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论