Looks like you tried something like:
In [364]: f=h5py.File('test.hdf5','w')
In [365]: grp=f.create_group('alist')
In [366]: grp.create_dataset('alist',data=[a,b,c])
...
TypeError: Object dtype dtype('O') has no native HDF5 equivalent
But if instead you save the arrays as separate datasets it works:
In [367]: adict=dict(a=a,b=b,c=c)
In [368]: for k,v in adict.items():
grp.create_dataset(k,data=v)
.....:
In [369]: grp
Out[369]: <HDF5 group "/alist" (3 members)>
In [370]: grp['a'][:]
Out[370]: array([ 0.1, 0.2, 0.3])
and to access all the datasets in the group:
In [389]: [i[:] for i in grp.values()]
Out[389]:
[array([ 0.1, 0.2, 0.3]),
array([ 0.1, 0.2, 0.3, 0.4, 0.5]),
array([ 0.1, 0.2])]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…