scvelo.utils.cleanup

scvelo.utils.cleanup(adata, clean='layers', keep=None, inplace=True)

Delete not needed attributes.

adata

Annotated data matrix.

clean

Which attributes to consider for freeing memory.

keep

Which attributes to keep.

inplace

Whether to update adata inplace or not.

Return type

AnnData, None

Returns

Optional[AnnData] – Returns or updates adata with selection of attributes kept.