Utils
- extract_arguments(args, method)[source]
Extract the arguments from a dictionary that fit to a methods parameters.
- Parameters:
args (dict) – dictionary of arguments;
method (function) – method for which the arguments should be extracted.
- object_to_primitive(obj)[source]
Converts an object into a string using the class name
- Parameters:
obj – the object to convert.
- Returns:
A string representing the object.
- dictionary_to_primitive(data)[source]
Function that converts a dictionary by transforming any objects inside into strings
- Parameters:
data (dict) – the dictionary to convert.
- Returns:
The converted dictionary.
- build_sweep_list(algs, sweep_conf, base_name='c_')[source]
Build the sweep list, from a compact dictionary specification, for every considered algorithm.
- Parameters:
algs (list) – list of algorithms to be considered;
sweep_conf (dict) – dictionary with a compact sweep configuration for every algorithm;
base_name (str, 'c_') – base name for the sweep configuiration.
- Returns:
The sweep list to be used with the suite.
- build_sweep_dict(base_name='c_', **kwargs)[source]
Build the sweep dictionary, from a set of variable specifications.
- Parameters:
base_name (str, 'c_') – base name for the sweep configuiration;
**kwargs – the parameter specifications for the sweep.
- Returns:
The sweep dictionary, where the key is the sweep name and the value is a dictionary with the sweep parameters.