qsrlib_utils.utils module¶
-
qsrlib_utils.utils.flatten_list(l)[source]¶ Flatten an irregular list, i.e. a list containing a mixture of iteratable and non-iteratable items, returning a generator object.
Parameters: l (list or tuple) – The list to flatten. Returns: Flattened list as a generator. Use list(flatten_list(l)) to get a list back. Return type: generator
-
qsrlib_utils.utils.isnan(x)[source]¶ Check if nan.
Parameters: x (int or float) – The value to be checked. Returns: Whether nan or not. Return type: bool
-
qsrlib_utils.utils.load_dynamic_args_from_file(path)[source]¶ Load dynamic_args from a yaml file.
Parameters: path (str) – The filename including its path. Returns:
-
qsrlib_utils.utils.merge_world_qsr_traces(world_qsr_traces, qsr_type='')[source]¶ Merge a list of traces into one world_qsr_trace. It offers no protection versus overwriting previously existing relations.
Parameters: - world_qsr_traces (list or tuple) – The World_QSR_Trace objects to be merged.
- qsr_type (str) – The QSR type of the merged object.
Returns: The merged world_qsr_traces.
Return type: