Making code compatible with Python 3

This commit is contained in:
Ankit Agrawal
2013-07-04 17:31:28 +08:00
parent 7282f561d4
commit 2f817542b8
+2 -2
View File
@@ -338,9 +338,9 @@ def downsample(array, factors, mode='sum'):
block_shape = out.shape
if mode == 'sum':
for i in range(len(block_shape)/2):
for i in range(len(block_shape)//2):
out = out.sum(-1)
else:
for i in range(len(block_shape)/2):
for i in range(len(block_shape)//2):
out = out.mean(-1)
return out