title: How to pass an array to scipy.integrate.solve_ivp using args?
body: <p>How to pass an array to scipy.integate.solve_ivp function? Now the <code>u=1.0</code>, what I wanted is <code>u=np.random.uniform(-1, 1, 1000)</code>.</p>
  
  <p>The scipy version is 1.4.1</p>
  
  <p>The code is:</p>
  
  <pre><code>import numpy as np
  from scipy.integrate import solve_ivp
  
  def func(t, x, u):
      dydt = (-x + u) / 5
      return dydt
  
  y0 = 0
  t_span = [0, 10]  
  t_eval = np.linspace(0, 10, 1000)
  u = 1.0
  
  sol = solve_ivp(func, t_span=t, y0=y0, t_eval=t_eval, args=(u, ))
  </code></pre>
  
  <p>Any help would be appreciated!</p>
  
  <p>Don't forget the comma in <code>arg=(u, )</code>, or you will have an error <code>odepack.error: Extra arguments must be in a tuple</code>. Thanks @Bear Brown for solving this problem.</p>