This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / integrate / _ivp / common / select_initial_step

function

scipy.integrate._ivp.common:select_initial_step

source: build-install/usr/lib/python3.14/site-packages/scipy/integrate/_ivp/common.py:68

Signature

def select_initial_step(fun, t0, y0, t_bound, max_step, f0, direction, order, rtol, atol)

Summary

Empirically select a good initial step.

Extended Summary

The algorithm is described in [1].

Parameters

fun : callable

Right-hand side of the system.

t0 : float

Initial value of the independent variable.

y0 : ndarray, shape (n,)

Initial value of the dependent variable.

t_bound : float

End-point of integration interval; used to ensure that t0+step<=tbound and that fun is only evaluated in the interval [t0,tbound]

max_step : float

Maximum allowable step size.

f0 : ndarray, shape (n,)

Initial value of the derivative, i.e., fun(t0, y0).

direction : float

Integration direction.

order : float

Error estimator order. It means that the error controlled by the algorithm is proportional to ``step_size ** (order + 1)`.

rtol : float

Desired relative tolerance.

atol : float

Desired absolute tolerance.

Returns

h_abs : float

Absolute value of the suggested initial step.

Aliases

  • scipy.integrate._ivp.bdf.select_initial_step