Subexpression class¶
(Shortest import: from brian2.core.variables import Subexpression)
-
class
brian2.core.variables.Subexpression(name, unit, owner, expr, device, dtype=None, scalar=False)[source]¶ Bases:
brian2.core.variables.VariableAn object providing information about a named subexpression in a model. Most of the time
Variables.add_subexpressionshould be used instead of instantiating this class directly.Parameters: name : str
The name of the subexpression.
unit :
UnitThe unit of the subexpression.
owner :
GroupThe group to which the expression refers.
expr : str
The subexpression itself.
device :
DeviceThe device responsible for the memory access.
dtype :
dtype, optionalThe dtype used for the expression. Defaults to core.default_float_dtype.
scalar: bool, optional :
Whether this is an expression only referring to scalar variables. Defaults to
FalseAttributes
deviceThe Deviceresponsible for memory accessexprThe expression defining the subexpression identifiersThe identifiers used in the expression Methods
get_addressable_value(name, group)get_addressable_value_with_unit(name, group)Details
-
device¶ The
Deviceresponsible for memory access
-
expr¶ The expression defining the subexpression
-
identifiers¶ The identifiers used in the expression
-