stlearn.pp.scale¶
- stlearn.pp.scale(adata: Union[AnnData, ndarray, spmatrix], zero_center: bool = True, max_value: Optional[float] = None, copy: bool = False) Optional[AnnData] [source]¶
Wrap function of scanpy.pp.scale
Scale data to unit variance and zero mean. .. note:
Variables (genes) that do not display any variation (are constant across all observations) are retained and set to 0 during this operation. In the future, they might be set to NaNs.
- Parameters:
data – The (annotated) data matrix of shape n_obs × n_vars. Rows correspond to cells and columns to genes.
zero_center – If False, omit zero-centering variables, which allows to handle sparse input efficiently.
max_value – Clip (truncate) to this value after scaling. If None, do not clip.
copy – If an
AnnData
is passed, determines whether a copy is returned.
- Return type:
Depending on copy returns or updates adata with a scaled adata.X.