Var.new_value()#
- classmethod Var.new_value(value, name='', inference=None)[source]#
Initializes a strong variable without a distribution.
- Parameters:
value (
Any
) – The value of the variable.distribution – The probability distribution of the variable.
name (
str
) – The name of the variable. If you do not specify a name, a unique name will be automatically generated upon initialization of aModel
. (default:''
)inference (
TypeAliasType
) – Additional information that can be used to set up inference algorithms. (default:None
)
- Return type:
See also
Var.new_param
Initializes a strong variable that acts as a model parameter.
Var.new_param
Initializes a strong variable that acts as a model parameter.
Var.new_calc
Initializes a weak variable that is a function of other variables.
Examples
A simple value variable without a name:
>>> x = lsl.Var.new_value(1.0) >>> x Var(name="")