title: Matlab filter() with SciPy lfilter()
body: <p>According to their documentation for <a href="http://www.mathworks.com/help/techdoc/ref/filter.html" rel="noreferrer">Matlab filter()</a> and <a href="http://docs.scipy.org/doc/scipy-0.10.0/reference/generated/scipy.signal.lfilter.html" rel="noreferrer">SciPy lfilter()</a>, it seems like they should be "compatible". However I have a problem, porting larger Matlab code in Python, for which I get <code>ValueError: object of too small depth for desired array</code>. As I can't think of how I can present my source without complicating it, I'll use the example provided in Matlab's documentation:</p>
  
  <pre><code>data = [1:0.2:4]';
  windowSize = 5;
  filter(ones(1,windowSize)/windowSize,1,data)
  </code></pre>
  
  <p>which I translate in Python to:</p>
  
  <pre><code>import numpy as np
  from scipy.signal import lfilter
  
  data = np.arange(1, 4.1, 0.2)
  windowSize = 5
  lfilter(np.ones((1, windowSize)) / windowSize, 1, data)
  </code></pre>
  
  <p>In this case I get:<br>
  <code>ValueError: object too deep for desired array</code></p>
  
  <p>Why do I get these errors?</p>