from scipy.ndimage.filters import gaussian_filter blurred = gaussian_filter(a, sigma=7) #if 3d image: blurred = gaussian_filter(img, sigma=(5,5,0))