Saving python dictionary in hdf5 where values ​​corresponding to each key are a different dictionary

I have a python dictionary like this

`my_dict = {'name_1' : {'value1' : a float32 numpy array, 
                        'value2' : a float32 numpy array}
           {'name_2' : {'value1' : a float32 numpy array, 
                        'value2' : a float32 numpy array}}`

      

How do I store it in hdf5

with h5py

so that I can later access the key-value pairs as they are now represented in the python dictionary?

+3


source to share





All Articles