y = sp.ndimage.filters.convolve(x, weights, mode='constant')
pl.imshow(y, cmap='Blues', interpolation='nearest')
pl.xlabel('$x$')
pl.ylabel('$y$')
pl.savefig('smooth_array.png')
How can I smooth elements of a two-dimensional array with differing gaussian functions in python?