rapids_singlecell.pp.log1p#
- rapids_singlecell.pp.log1p(adata, *, base=None, layer=None, obsm=None, inplace=True, copy=False)[source]#
Logarithmize the data matrix.
Computes \(X = \log(X + 1)\), where \(log\) denotes the natural logarithm unless a different
baseis given.- Parameters:
- adata
AnnData AnnData object
- base
float|None(default:None) Base of the logarithm. Natural logarithm is used by default.
- layer
str|None(default:None) Layer to normalize instead of
X. IfNone,Xis normalized.- obsm
str|None(default:None) Entry of
.obsmto transform.- inplace
bool(default:True) Whether to update
adataor return the matrix.- copy
bool(default:False) Whether to return a copy or update
adata. Not compatible withinplace=False.
- adata
- Return type:
- Returns:
The resulting matrix after applying the logarithm of one plus the input matrix. If
copyis set to True, returns the modified AnnData. Otherwise, updates theadataobject in-place and returns None.