stlearn.pp.scale¶
-
stlearn.pp.scale(adata: Union[anndata._core.anndata.AnnData, numpy.ndarray, scipy.sparse.base.spmatrix], zero_center: bool = True, max_value: Optional[float] = None, copy: bool = False) → Optional[anndata._core.anndata.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
AnnDatais passed, determines whether a copy is returned.
- Returns
- Return type
Depending on copy returns or updates adata with a scaled adata.X.