AuxiliaryVariable class

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

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

Bases: brian2.core.variables.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.

Parameters:

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.

Methods

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

Details

get_value()[source]

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