to_file#

caput.memdata.MemGroup.to_file(filename, mode='w', hints=True, convert_attribute_strings=True, convert_dataset_strings=False, file_format=None, **kwargs)[source]#

Replicate object on disk in an hdf5 or zarr file.

Any keyword arguments are passed on to the constructor for h5py.File or zarr.File.

Parameters:
filenamepath_like

File to save into.

modestr

Mode in which to open file. Default is “w”.

hintsbool

Whether to write hints into the file that described whether datasets are distributed, or not.

convert_attribute_stringsbool

Try and convert attribute string types to a unicode type that HDF5 understands. Default is True.

convert_dataset_stringsbool

Try and convert dataset string types to bytestrings. Default is False.

file_formatFileFormat | None

File format to use. Default is None, i.e. guess from the name.

**kwargsAny

Arbitrary keyword arguments.