from brian2.equations.codestrings import is_constant_over_dt)
is_constant_over_dt(expression, variables, dt_value)¶
Check whether an expression can be considered as constant over a time step. This is not the case when the expression either:
contains the variable
t(except as the argument of a function that can be considered as constant over a time step, e.g. a
TimedArraywith a dt equal to or greater than the dt used to evaluate this expression)
refers to a stateful function such as
The (sympy) expression to analyze
variables : dict
The variables dictionary.
dt_value : float or None
The length of a timestep (without units), can be
Noneif the time step is not yet known.
is_constant : bool
Whether the expression can be considered to be constant over a time step.