scanpy.api.pp.log1p¶
-
scanpy.api.pp.
log1p
(data, copy=False, chunked=False, chunk_size=None)¶ Logarithmize the data matrix.
Computes \(X = \log(X + 1)\), where \(log\) denotes the natural logarithm.
- Parameters
- data :
AnnData
,ndarray
,spmatrix
Union
[AnnData
,ndarray
,spmatrix
] The (annotated) data matrix of shape
n_obs
×n_vars
. Rows correspond to cells and columns to genes.- copy :
bool
bool
(default:False
) If an
AnnData
is passed, determines whether a copy is returned.- chunked :
bool
bool
(default:False
) Process the data matrix in chunks, which will save memory. Applies only to
AnnData
.- chunk_size :
int
,None
Optional
[int
] (default:None
) n_obs
of the chunks to process the data in.
- data :
- Return type
- Returns
Returns or updates
data
, depending oncopy
.