weights = np.array([[0, 0, 1, 0, 0], [0, 2, 4, 2, 0], [1, 4, 8, 4, 1], [0, 
    2, 4, 2, 0], [0, 0, 1, 0, 0]], dtype=np.float)
How can I smooth elements of a two-dimensional array with differing gaussian functions in python?