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: timekey-value pair to aparamsdict.- Parameters
params (dict or None) – Input dict. Can be empty or None.
paramsmust not contain thetime_namekey - 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
timeargument is a finite real number. By default, no check is performed.
- Returns
tparams – A copy of the input dict
paramsthat contains an additionaltime_name: timekey-value pair.- Return type
