Function class
(Shortest import: from brian2 import Function)
-
class
brian2.core.functions.
Function
(pyfunc, sympy_func=None, arg_units=None, arg_names=None, return_unit=None, arg_types=None, return_type=None, stateless=True, auto_vectorise=False)[source] Bases:
object
An abstract specification of a function that can be used as part of model equations, etc.
Attributes
implementations
Stores implementations for this function in a FunctionImplementationContainer
Methods
__call__
(*args)Call self as a function. is_locally_constant
(dt)Return whether this function (if interpreted as a function of time) should be considered constant over a timestep. Details
-
implementations
Stores implementations for this function in a
FunctionImplementationContainer
-
is_locally_constant
(dt)[source] Return whether this function (if interpreted as a function of time) should be considered constant over a timestep. This is most importantly used by
TimedArray
so that linear integration can be used. In its standard implementation, always returnsFalse
.
-