create_variable

CalibrationGraph.create_variable(initial_value, upper_bound=inf, lower_bound=-inf, name=None)

Add a variable to the calibration graph.

Parameters

  • initial_value (np.ndarray) – The initial value assigned to the variable. It must only contain real values, and the values must lie between upper_bound and lower_bound, if they are defined. It cannot have more than one dimension.
  • upper_bound (float , optional) – The upper limit of the values of this variable. Defaults to np.inf, in which case no upper limit is enforced.
  • lower_bound (float , optional) – The upper limit of the values of this variable. Defaults to -np.inf, in which case no lower limit is enforced.
  • name (str or None , optional) – The name of the variable. Each variable name has to be unique in a given graph. Defaults to None, in which case a random name is assigned to the variable.

Returns

The object holding the calibration variable.

Return type

Variable

Was this useful?