mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-05 13:21:12 +08:00
Making code compatible with Python 3
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user