def log1p(data, copy=False):
adata = data.copy() if copy else data<EOL>X = (adata.X.data if issparse(adata.X) else adata.X) if isinstance(adata, AnnData) else adata<EOL>np.log1p(X, out=X)<EOL>return adata if copy else None<EOL>
Logarithmize the data matrix.
    Computes :math:`X = \\log(X + 1)`, where :math:`log` denotes the natural logarithm.
    Parameters
    ----------
    data: :class:`~anndata.AnnData`
        Annotated data matrix.
    copy: `bool` (default: `False`)
        Return a copy of `adata` instead of updating it.
    Returns
    -------
    Returns or updates `adata` depending on `copy`.