h5.archive.HDFArchive.as_bytes

HDFArchive.as_bytes()[source]

Serialize the underlying HDF5 file to an in-memory byte buffer.

Returns:
bytes

A copy of the whole HDF5 file, suitable e.g. for MPI broadcast or for re-opening with HDFArchive(buffer).