title: convolution with gaussian vs gaussian filter
body: <p>Simple task.. I want to smoothen out some vector with a Gaussian.. This is just a test case, later on I want to apply this to an image.</p>
  
  <pre><code>import numpy as np
  import scipy.stats
  import scipy.ndimage
  
  m = 7  # size of the 'signal'
  n = 7  # size of the filter
  sgm = 2  # dev for standard distr
  weight_conv = np.zeros(2*m*n).reshape(2*n, m)  # Weights for the convolution
  
  input_signal = np.array(range(m))  # input signal..
  x1 = np.linspace(-4*sgm, 4*sgm, n)  # x-values for the normal-dstr
  input_filter = scipy.stats.norm.pdf(x1, loc=0, scale=sgm)
  
  # create my own weight matrix
  for i in range(weight_conv.shape[1]):
      weight_conv[i:(len(input_filter)+i), i] = input_filter
  
  # My own way of calculating the convolution
  np.sum(weight_conv * input_signal, axis=1)
  # Convolution provided by numpy
  np.convolve(input_signal, input_filter)
  # Apply the scipy gaussian filter...
  scipy.ndimage.filters.gaussian_filter(input_signal, sigma=sgm)
  scipy.ndimage.filters.gaussian_filter1d(input_signal, sigma=sgm)
  </code></pre>
  
  <p>Now my idea is that these all should be similar. My method is does produce similar output as the numpy convolution, but the scipy method is different...</p>
  
  <pre><code>scipy.ndimage.filters.gaussian_filter(input_signal, sigma=sgm)
  array([1, 1, 2, 3, 3, 4, 4])
  </code></pre>
  
  <p>Now it must be the case that scipy is doing something different. But WHAT? I dont know. I have checked the source, and there it seems they are just using a convolution with a gaussian kernel (which is what I am also doing). But the answers dont add up...</p>
  
  <p>Anyone has a different idea?</p>