scanpy.pp.log1p#
- scanpy.pp.log1p(data, *, base=None, copy=False, chunked=None, chunk_size=None, layer=None, obsm=None)[source]#
Logarithmize the data matrix.
Computes \(X = \log(X + 1)\), where \(log\) denotes the natural logarithm unless a different base is given.
- Parameters:
- data
AnnData|ndarray|csr_array|csc_array|csr_matrix|csc_matrix The (annotated) data matrix of shape
n_obs×n_vars. Rows correspond to cells and columns to genes.- base
Number|None(default:None) Base of the logarithm. Natural logarithm is used by default.
- copy
bool(default:False) If an
AnnDatais passed, determines whether a copy is returned.- chunked
bool|None(default:None) Process the data matrix in chunks, which will save memory. Applies only to
AnnData.- chunk_size
int|None(default:None) n_obsof the chunks to process the data in.- layer
str|None(default:None) Entry of layers to transform.
- obsm
str|None(default:None) Entry of obsm to transform.
- data
- Return type:
AnnData|ndarray|csr_array|csc_array|csr_matrix|csc_matrix|None- Returns:
Returns or updates
data, depending oncopy.