You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to store a dictionary in the archive, where the key is something more complicated, like a tuple.
d = {(1,2) : 1}
ar['d'] = d
When I retrieve it from the archive, the key is not a tuple but a string:
ar['d'] returns
d = {'(1,2)' : 1}
so it cannot be used as the original dictionary. Happens for instance for SK.sumk_to_solver.
The text was updated successfully, but these errors were encountered:
Hello Markus,
I think, this issue looks more like a feature request.
Names of HDF5 groups and datasets have to be strings, and the Python dictionaries are stored as HDF5 groups. However, I can see a way around it. The non-string names could be simply represented by strings, and accompanied by small type tags (HDF5 attributes). These type tags would allow to correctly reconstruct the corresponding Python objects from the string form on loading.
I want to store a dictionary in the archive, where the key is something more complicated, like a tuple.
d = {(1,2) : 1}
ar['d'] = d
When I retrieve it from the archive, the key is not a tuple but a string:
ar['d'] returns
d = {'(1,2)' : 1}
so it cannot be used as the original dictionary. Happens for instance for SK.sumk_to_solver.
The text was updated successfully, but these errors were encountered: