is_stateful function

(Shortest import: from brian2.equations.equations import is_stateful)

brian2.equations.equations.is_stateful(expression, variables)[source]

Whether the given expression refers to stateful functions (and is therefore not guaranteed to give the same result if called repetively).


expression : sympy.Expression

The sympy expression to check.

variables : dict

The dictionary mapping variable names to Variable or Function objects.


stateful : bool

True, if the given expression refers to a stateful function like rand() and False otherwise.