If you have a two-dimensional numpy array a
, you can use a Gaussian filter on it directly without using Pillow to convert it to an image first. scipy has a function gaussian_filter that does the same.
from scipy.ndimage.filters import gaussian_filter
blurred = gaussian_filter(a, sigma=7)