def save_hdf5(filename, obj, compression=4):
 _check_available()
 with h5py.File(filename, 'w') as f:
  s = HDF5Serializer(f, compression=compression)
  s.save(obj)

def save_hdf5 ( filename , obj , compression = 4 ) : _check_available ( ) with h5py . File ( filename , 'w' ) as f : s = HDF5Serializer ( f , compression = compression ) s . save ( obj )
saves an object to the file in hdf5 format .