title: How to use scipy.integrate.ode.set_f_params() to make time dependant parameter changes?
body: <p>The following script illustrates some behaviour of <code>scipy.integrate.ode.set_f_params()</code> that confuses me.</p>
  
  <pre><code>from scipy.integrate import ode
  
  def f(t,ys,a):
      return a
  
  p = [1]
  r = ode(f).set_initial_value(0,0).set_f_params(*p)
  
  s = 0
  while r.successful() and s&lt;5:
      r.integrate(r.t+1)
      print r.t, r.y, p
  
      p[0] += 1
      r = ode(f).set_initial_value(r.y,r.t).set_f_params(*p) ### Option 1
      # r = r.set_f_params(*p) ### Option 2
  
      s += 1
  </code></pre>
  
  <p>The output using Option 1 is:</p>
  
  <pre><code>1.0 [ 1.] [1]
  2.0 [ 3.] [2]
  3.0 [ 6.] [3]
  4.0 [10.] [4]
  5.0 [ 15.] [5]
  </code></pre>
  
  <p>which is what I expect. I thought Option 2 should give the same output, yet it gives the following:</p>
  
  <pre><code>1.0 [ 1.] [1]
  2.0 [ 2.] [2]
  3.0 [ 3.] [3]
  4.0 [ 5.64491239] [4]
  5.0 [ 9.64491239] [5]
  </code></pre>
  
  <p>If someone could shed some light on this I would greatly appreciate it.</p>