rapids_singlecell.pp.log1p#
- rapids_singlecell.pp.log1p(data, *, base=None, use=None, out=False, layer=None, obsm=None, inplace=True, copy=False)[source]#
Logarithmize the data matrix.
Computes , where denotes the natural logarithm unless a different
baseis given.- Parameters:
- data
AnnData|ndarray|csc_matrix|csr_matrix|Array The (annotated) data matrix of shape
n_obs×n_vars. Rows correspond to cells and columns to genes. If a matrix is passed instead of anAnnDataobject, the transformed matrix is returned.- base
float|None(default:None) Base of the logarithm. Natural logarithm is used by default.
- use
LayerAcc|MultiAcc|str|None(default:None) Which matrix to transform, e.g.
A.X,A.layers['counts']orA.obsm['x']. Strings are resolved byanndata.acc.AdAcc.resolve(), e.g.'layers.counts'.- out
LayerAcc|MultiAcc|str|bool(default:False) Where to write the result, e.g.
A.layers['k'](or'layers.k'). IfTrue, the result is returned instead of written. IfFalse, it is written to the placeusereads from.
- data
- Return type:
- Returns:
The transformed matrix if a matrix is passed or
out=True, elseNone.