title: Python: _dop.error: failed in processing argument list for call-back fcn
body: <p>After having cleared my last error, I ran into another error and this error is more fundamental to the ode solver. Below is my error.</p>
  
  <pre><code>Traceback (most recent call last):
    File "cont_inside_f.py", line 36, in &lt;module&gt;
      x,t,u=solver(0,1e-2,10,[0,0],[a,eta,k,lam])
    File "cont_inside_f.py", line 24, in solver
      r.integrate(r.t+dt)
    File "/usr/local/lib/python2.7/dist-packages/scipy/integrate/_ode.py", line 408, in integrate
      self.f_params, self.jac_params)
    File "/usr/local/lib/python2.7/dist-packages/scipy/integrate/_ode.py", line 1032, in run
      tuple(self.call_args) + (f_params,)))
  _dop.error: failed in processing argument list for call-back fcn.
  </code></pre>
  
  <p>I created a function that returns a list of lists. I wish to pass first element of this list to the ode solver for integration and second element of this returned list is something that I wish to plot later down my code. Kindly help me solve this error, thanks in advance!</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  from scipy.integrate import ode
  from numpy import tanh,array,sin,cos
  
  def f(t,Y,param):
      x1,x2=Y[0],Y[1]
      a,eta,k,lam=param[0],param[1],param[2],param[3]
      e=x1-2
      de=-2*x1+a*x2+sin(x1)
      s=de+lam*e
      u=(1/(a*cos(2*x1)))*(-eta*tanh(s)-k*s-(-2*x1+a*x2+sin(x1))*cos(x1)+2*(-2*x1+a*x2+sin(x1))+a*x2*cos(x1))
      x1dot=-2*x1+a*x2+sin(x1)
      x2dot=-x2*cos(x1)+cos(2*x1)*u
      x=[x1dot,x2dot]
      return [x,u]
  
  def solver(t0,dt,t1,y0,param):
      x,u=[[] for i in range(2)],[]
      #import pdb;pdb.set_trace()
      r=ode(f(t0,y0,param)[0]).set_integrator('dopri5',method='bdf')
      r.set_initial_value(y0,t0).set_f_params(param)
      while r.successful() and r.t&lt;t1:
          r.integrate(r.t+dt)
          for i in range(2):
              x[i].append(r.y[i])
          t.append(r.t)
          #u.append(f(r.t,[r.y[0],r.y[1]],param)[1])
          u.append(f(t0,y0,param)[1])
  
          #print(t)
      return x,t,u
  
  if __name__=='__main__':
      a,eta,k,lam=2,1.2,3,2
      x,t,u=solver(0,1e-2,10,[0,0],[a,eta,k,lam])
      for i in range(3):
          if i!=2:
              plt.subplot(3,1,i+1)
              plt.plot(t,x[i])
          else:
              plt.subplot(3,1,i+1)
              plt.plot(t,u)
      plt.show()
  </code></pre>