Constant class¶
(Shortest import: from brian2.core.variables import Constant)
-
class
brian2.core.variables.Constant(name, value, dimensions=Dimension(), owner=None)[source]¶ Bases:
brian2.core.variables.VariableA scalar constant (e.g. the number of neurons
N). Information such as the dtype or whether this variable is a boolean are directly derived from thevalue. Most of the timeVariables.add_constantshould be used instead of instantiating this class directly.Attributes
valueThe constant’s value Methods
get_value()Return the value associated with the variable (without units). item()Details
-
value¶ The constant’s value
-