smac.utils.data_structures¶
Functions¶
  | 
Batches an iterable into chunks of size n.  | 
  | 
Compares dictionaries recursively.  | 
Interfaces¶
- smac.utils.data_structures.batch(iterable, n=1)[source]¶
 Batches an iterable into chunks of size n.
- Return type:
 Iterable[list]
- smac.utils.data_structures.recursively_compare_dicts(d1, d2, *, level='root', diff=None)[source]¶
 Compares dictionaries recursively. Returns a list of differences in string format.
- Parameters:
 d1 (dict) – First dictionary.
d2 (dict) – Second dictionary.
level (str, defaults to "root") – How the first level is called.
diff (list[str] | None, defaults to None) – Used for recursion.
- Returns:
 List of differences in string format.
- Return type:
 list[str]