qimpy.io.dict.flatten
- flatten(d, _key_prefix=())
Convert nested dict d to a flat dict with tuple keys. Input _key_prefix is prepended to the keys of the resulting dict, and is used internally for recursively flattening the dict.
- Parameters:
d (dict) –
_key_prefix (tuple) –
- Return type:
dict