title: convolve and deconvolve two arrays
body: <p>So I am trying to figure out how to get convolve and deconvolve to work properly. Here's my code: </p>
  
  <pre><code>import numpy as np
  from scipy import interpolate
  from scipy import signal
  import matplotlib.pyplot as plt
  
  a = np.arange(0, 50, 1)
  b = np.array([1,2,1])
  
  aconvolved = signal.convolve(np.sin(a), b)
  adeconvolved = signal.deconvolve(aconvolved, b)
  
  plt.figure()
  plt.plot(a, np.sin(a), 'g')
  plt.plot(a, aconvolved[0], 'r')
  plt.plot(a, adeconvolved[0], 'b')
  plt.draw()
  </code></pre>
  
  <p>When I convolve "a" about a single point (like b = [2]), instead of an array, it works just fine. But when I attempt to do it about more than 1 point, or an array, it just doesn't work. I receive errors such as:</p>
  
  <pre><code>"ValueError: x and y must have same first dimension"
  </code></pre>
  
  <p>I get this same error if I instead use:</p>
  
  <pre><code>a = np.arange(1, 50, 1)
  b = np.array([1,2,1])
  </code></pre>
  
  <p>Even though in this case, I know they do both start at 1. If I do the same thing, but with</p>
  
  <pre><code>b = np.array([1,2,1])
  </code></pre>
  
  <p>I get an error of:</p>
  
  <pre><code>"ValueError: BUG: filter coefficient a[0] == 0 not supported yet"
  </code></pre>
  
  <p>Anyone have any tips for what I am doing wrong?</p>