title: Downsample a 1D numpy array
body: <p>I have a 1-d numpy array which I would like to downsample. Any of the following methods are acceptable if the downsampling raster doesn't perfectly fit the data:</p>
  
  <ul>
  <li>overlap downsample intervals</li>
  <li>convert whatever number of values remains at the end to a separate downsampled value</li>
  <li>interpolate to fit raster</li>
  </ul>
  
  <p>basically if I have </p>
  
  <pre><code>1 2 6 2 1
  </code></pre>
  
  <p>and I am downsampling by a factor of 3, all of the following are ok:</p>
  
  <pre><code>3 3
  
  3 1.5
  </code></pre>
  
  <p>or whatever an interpolation would give me here.</p>
  
  <p>I'm just looking for the fastest/easiest way to do this.</p>
  
  <p>I found <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.decimate.html" rel="noreferrer"><code>scipy.signal.decimate</code></a>, but that sounds like it <em>decimates</em> the values (takes them out as needed and only leaves one in X).  <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.resample.html" rel="noreferrer"><code>scipy.signal.resample</code></a> seems to have the right name, but I do not understand where they are going with the whole fourier thing in the description. My signal is not particularly periodic.</p>
  
  <p>Could you give me a hand here? This seems like a really simple task to do, but all these functions are quite intricate...</p>