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

bundles / scipy latest / scipy / integrate / _ivp / ivp / handle_events

function

scipy.integrate._ivp.ivp:handle_events

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

Signature

def handle_events(sol, events, active_events, event_count, max_events, t_old, t)

Summary

Helper function to handle events.

Parameters

sol : DenseOutput

Function sol(t) which evaluates an ODE solution between t_old and t.

events : list of callables, length n_events

Event functions with signatures event(t, y).

active_events : ndarray

Indices of events which occurred.

event_count : ndarray

Current number of occurrences for each event.

max_events : ndarray, shape (n_events,)

Number of occurrences allowed for each event before integration termination is issued.

t_old, t : float

Previous and new values of time.

Returns

root_indices : ndarray

Indices of events which take zero between t_old and t and before a possible termination.

roots : ndarray

Values of t at which events occurred.

terminate : bool

Whether a terminal event occurred.

Aliases

  • scipy.integrate._ivp.ivp.handle_events