text: 
  import numpy as np
  import matplotlib.pyplot as plt
  
  def dnorm(x, mu, sd):
      return 1 / (np.sqrt(2 * np.pi) * sd) * np.e ** (-np.power((x - mu) / sd, 2) / 2)
  
  def gaussian_kernel(size, sigma=1, verbose=False):
  
      kernel_1D = np.linspace(-(size // 2), size // 2, size)
      for i in range(size):
          kernel_1D[i] = dnorm(kernel_1D[i], 0, sigma)
      kernel_2D = np.outer(kernel_1D.T, kernel_1D.T)
  
      kernel_2D *= 1.0 / kernel_2D.max()
  
      if verbose:
          plt.imshow(kernel_2D, interpolation='none',cmap='gray')
          plt.title("Image")
          plt.show()
  
      return kernel_2D
  
  res = 256
  
  kern = gaussian_kernel(res, res/6)
  print(kern)
  
  plt.imsave("gauss.png", kern, cmap='gray')
  