AnnData.write(filename=None, compression='gzip', compression_opts=None, force_dense=None)

Write .h5ad-formatted hdf5 file.


Setting compression to None can dramatically speed up writing.

filename : Optional[PathLike]

Filename of data file. Defaults to backing file.

compression : None or {'gzip', 'lzf'}

See the h5py filter pipeline.

compression_opts : int, Any, None

See the h5py filter pipeline.

force_dense : Optional[bool]

Write sparse data as a dense matrix. Defaults to True if object is backed, otherwise to False.