4.1.2. tkwant.system.add_time_to_params¶
-
tkwant.system.
add_time_to_params
(params, time_name, time, check_numeric_type=False)[source]¶ Add a
time_name: time
key-value pair to aparams
dict.- Parameters
params (dict or None) – Input dict. Can be empty or None.
params
must not contain thetime_name
key - this will raise a KeyError.time_name (obj) – A dict key to refer to the “time”.
time (obj) – The actual value of “time”.
check_numeric_type (bool, optional) – If true, check if the
time
argument is a finite real number. By default, no check is performed.
- Returns
tparams – A copy of the input dict
params
that contains an additionaltime_name: time
key-value pair.- Return type