stlearn.pp.log1p(adata: Union[AnnData, ndarray, spmatrix], copy: bool = False, chunked: bool = False, chunk_size: Optional[int] = None, base: Optional[float] = None) Optional[AnnData][source]

Wrap function of scanpy.pp.log1p Copyright (c) 2017 F. Alexander Wolf, P. Angerer, Theis Lab

Logarithmize the data matrix. Computes \(X = \log(X + 1)\), where \(log\) denotes the natural logarithm unless a different base is given. :param data: The (annotated) data matrix of shape n_obs × n_vars.

Rows correspond to cells and columns to genes.

  • copy – If an AnnData is passed, determines whether a copy is returned.

  • chunked – Process the data matrix in chunks, which will save memory. Applies only to AnnData.

  • chunk_sizen_obs of the chunks to process the data in.

  • base – Base of the logarithm. Natural logarithm is used by default.

Return type:

Returns or updates data, depending on copy.