Skip to main content

normalize

Function normalize 

Source
pub fn normalize(m: &mut CountMatrix, params: &NormalizeParams)
Expand description

Normalize each cell to target_sum (or the median of totals) then optionally apply ln(1+x). Mirrors scanpy: a zero-count cell’s scaling factor collapses to 1, leaving its (empty) row untouched, and the sparsity pattern is exact because log1p(0) = 0.