title: ValueError("Denominator polynomial must be rank-1 array.")
body: <p>I've got the following code in <a href="http://ofan666.blogspot.in/2011/04/lti-transient-response-analysis-using.html" rel="nofollow">lti transient response analysis using Python(numpy, scipy, matplotlib)</a>. I am new in python. I have a transfer matrix which I have to plot.</p>
  
  <p>I came across <a href="http://www.mathworks.in/help/toolbox/control/ref/tf.html" rel="nofollow">mathwork: tf</a>. I am trying as follows:</p>
  
  <pre><code>from numpy import min, max
  from scipy import linspace
  from scipy.signal import lti, step, impulse
  
  num00 = [0.0]
  den00 = [0.0]
  
  num01 = [-2383.3]
  den01 = [1.0,160.3460,-1962.0,-314598.852]
  
  num10 = [1.0]
  den10 = [1.0]
  
  num11 = [31.9361,0,111320.0]
  den11 = [1.0,160.3460,-1962.0,-314598.852]
  
  num = [[num00,num01],[num10,num11]]
  den = [[den00,den01],[den10,den11]]
  
  tf = lti(num,den)
  
  t = 0    
  s = 0
  
  # get t = time, s = unit-step response
  t , s = step(tf)
  
  t , s = step(tf, T = linspace(min(t), t[-1], 1000))
  
  t , i = impulse(tf, T = linspace(min(t), t[-1], 1000))
  
  from matplotlib import pyplot as plt
  
  plt.plot(t, s, t, i)
  
  plt.title('Transient-Response Analysis')
  plt.xlabel('Time(sec)')
  plt.ylabel('Amplitude')
  plt.hlines(1, min(t), max(t), colors='r')
  plt.hlines(0, min(t), max(t))
  plt.xlim(xmax=max(t))
  plt.legend(('Unit-Step Response', 'Unit-Impulse Response'), loc=0)
  plt.grid()
  plt.show()
  </code></pre>
  
  <p>I am getting following error:</p>
  
  <pre><code>&gt;&gt;&gt; tf = lti(num,den)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Python26\lib\site-packages\scipy\signal\ltisys.py", line 236, in __init__self.__dict__['num'], self.__dict__['den'] = normalize(*args)
    File "C:\Python26\lib\site-packages\scipy\signal\filter_design.py", line 276, in normalize raise ValueError("Denominator polynomial must be rank-1 array.") ValueError: Denominator polynomial must be rank-1 array.
  </code></pre>