AuxiliaryVariable class

(Shortest import: from brian2.core.variables import AuxiliaryVariable)

class brian2.core.variables.AuxiliaryVariable(name, dimensions=Dimension(), dtype=None, scalar=False)[source]

Bases: Variable

Variable description for an auxiliary variable (most likely one that is added automatically to abstract code, e.g. _cond for a threshold condition), specifying its type and unit for code generation. Most of the time Variables.add_auxiliary_variable should be used instead of instantiating this class directly.


name : str

The name of the variable

dimensions : Dimension, optional

The physical dimensions of the variable.

dtype : dtype, optional

The dtype used for storing the variable. If none is given, defaults to core.default_float_dtype.

scalar : bool, optional

Whether the variable is a scalar value (True) or vector-valued, e.g. defined for every neuron (False). Defaults to False.



Return the value associated with the variable (without units).



Return the value associated with the variable (without units). This is the way variables are accessed in generated code.