问题
Solve_ivp is an initial value problem solver function from Scipy. In a few words
scipy.integrate.solve_ivp(fun, t_span, y0, method=’RK45’, t_eval=None, dense_output=False, events=None, vectorized=False, args=None, **options)
Solve an initial value problem for a system of ODEs. This function numerically integrates a system of ordinary differential equations given an initial value.
In the solve_ivp function documentation (Scipy reference guide 1.4.1 page 695) we have the following
Parameters fun [callable] Right-hand side of the system. The calling signature is fun(t, y). Here t is a scalar, and there are two options for the ndarray y: It can either have the shape (n,); then fun must return array_like with shape (n,). Alternatively, it can have the shape (n, k); then fun must return an array_like with shape (n, k), i.e. each column corresponds to a single column in y. The choice between the two options is determined by the vectorized argument (see below). The vectorized implementation allows a faster approximation of the Jacobian by finite differences (required for stiff solvers).
Here n stands for the no of dimensions in y. What does k stand for? This might seem a very naive question for those who know the answer. But please, believe me, I really could not find it (at least not in the documentation). The great hpaulj's answer to this question seems to shed some light. But well, IMHO it still is too dark to move around.
来源:https://stackoverflow.com/questions/60277979/what-does-the-letter-k-mean-in-the-documentation-of-solve-ivp-function-of-scipy