to_file#
- caput.mpiarray.MPIArray.to_file(f: str | h5py.File | h5py.Group | zarr.Group, dataset: str, create: bool = False, chunks: tuple[int, Ellipsis] | None = None, compression: str | int | None = None, compression_opts: tuple | None = None, file_format: caput.memdata.fileformats.FileFormat = fileformats.HDF5) None[source]#
Parallel write into a contiguous HDF5/Zarr dataset.
- Parameters:
- f
str|h5py.File|h5py.Group|zarr.Group File to write dataset into.
- dataset
str Name of dataset to write into. Should not exist.
- createbool
True if a new file should be created (if needed)
- chunks
tuple[int, …] |None, optional Chunk shape
- compression
str|int|None, optional Name or identifier of HDF5 compression filter.
- compression_opts
tuple|None, optional See HDF5 documentation for compression filters. Compression options for the dataset.
- file_format
fileformats.FileFormat Instance of
FileFormatspecifying the file format to use. DefaultHDF5.
- f