def downscale_local_mean(image, factors, cval=0, clip=True):
 return block_reduce(image, factors, np.mean, cval)

def downscale_local_mean ( image , factors , cval = 0 , clip = True ) : return block_reduce ( image , factors , np . mean , cval )
down-sample n-dimensional image by local averaging .