anndata_rs.AnnData.write

AnnData.write(filename, backend='hdf5', chunk_size=None)

Write .h5ad-formatted hdf5 file.

Parameters:
  • filename (Path) – File name of the output .h5ad file.

  • backend (Literal['hdf5', 'zarr']) – The backend to use. “hdf5” or “zarr” are supported.

  • chunk_size (int | None) – If None, writes the entire data matrix at once. Otherwise, rites the data matrix in chunks of the specified size. This can be useful for saving large datasets that do not fit into memory.