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).

Parameters

expression : sympy.Expression

The sympy expression to check.

variables : dict

The dictionary mapping variable names to Variable or Function objects.

Returns

stateful : bool

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