![](https://secure.gravatar.com/avatar/7f9b0e03e928855e6cb070b726b9b96a.jpg?s=120&d=mm&r=g)
Hello all, I am trying to use scipy.integrate.solve_bvp to solve a boundary value problem of a function in one variable -- $\phi(r)$ -- for a cylindrical geometry. The examples here are pretty good: https://docs.scipy.org/doc/scipy-0.18.1/reference/generated/scipy.integrate.... However, when casting into a ocupled first-order system, the issue here is that I have explicit dependence on the independent variable $r$. When I write the equivalent of
def fun(x, y): ... return np.vstack((y[1], -np.exp(y[0])))
, the interpreter promptly replies "TypeError: only length-1 arrays can be converted to Python scalars" -- this makes sense, since So, can scipy.integrate.solve_bvp be used in problems where there's an explicit dependence on $r$, for functions where the right-hand side is F(dq/dx, q, r)? Cheers! -- Boyan Penkov