Python odeint- Initial condition y0 must be one-dimensional
<p>I am trying to simulate a dynamic system in state space form with odeint.
My A matrix is 12*12 and B matrix is 12*4 (rows * cols) so my initial state vector is 12*1 as it suggests.</p>

<p>My code is as follows </p>

<pre><code>import numpy as np
from scipy.integrate import odeint

tmp = np.loadtxt("system.txt", skiprows =2)

A=np.matrix(tmp)[0:12,0:12]
B=np.matrix(tmp)[0:12,12:]

control = np.matrix([[0.0],[0.0],[-0.6310],[0.0]])

def aircraft(state, t):
    return A*state + B*control

state0 = np.array([[6.809827628],[0.439572153],[0.0],[0.0],[0.0],[0.0],[0.0],[0.0],[0.0],[0.0],[0.0],[0.0]])
t = np.arange(0.0, 10.0, 0.1)

state = odeint(aircraft, state0, t)
</code></pre>

<p>I am getting this error </p>

<pre><code>Traceback (most recent call last):
  File "sim.py", line 17, in &lt;module&gt;
    state = odeint(aircraft, state0, t)
  File "/home/aluminium/anaconda2/lib/python2.7/site-packages/scipy/integrate/odepack.py", line 215, in odeint
    ixpr, mxstep, mxhnil, mxordn, mxords)
ValueError: Initial condition y0 must be one-dimensional.
</code></pre>

<p>Only way I can think of defining state vector is as a column vector. 
Can you please let me know how to define a initial state vector to overcome this problem ?</p>

<p>Thanks so much in advance.</p>