title: Call odeint inside Python class
body: <p>I am trying to call the odeint inside a method in a python class:</p>
  
  <p>from scipy.integrate import odeint</p>
  
  <p>class Test:</p>
  
  <pre><code>@staticmethod
  def mathfunc(y, t arg1, arg2):
      x , xdot = y
      #some equations
      return xdot, xddot
  
  def numericalsim(self, y0, t):
      y = odeint(mathfunc, y0, t, args(self.param1, self.param2))
      return y
  </code></pre>
  
  <p>However, I get the error: name 'mathfunc' is not defined.
  Please can you help me in calling odeint inside a class.</p>