scvelo.utils.cleanup(data, clean='layers', keep=None, copy=False)

Deletes attributes not needed.

data : AnnData

Annotated data matrix.

clean : str or list of str (default: layers)

Which attributes to consider for freeing memory.

keep : str or list of str (default: None)

Which attributes to keep.

copy : bool (default: False)

Return a copy instead of writing to adata.


Returns or updates adata with selection of attributes kept.