rapids_singlecell.pp.sqrt#

rapids_singlecell.pp.sqrt(data, *, use=None, out=False, layer=None, obsm=None, inplace=True, copy=False)[source]#

Take the square root of the data matrix.

Computes X=X.

Parameters:
data AnnData | ndarray | csc_matrix | csr_matrix | Array

The (annotated) data matrix of shape n_obs × n_vars. Rows correspond to cells and columns to genes. If a matrix is passed instead of an AnnData object, the transformed matrix is returned.

use LayerAcc | MultiAcc | str | None (default: None)

Which matrix to transform, e.g. A.X, A.layers['counts'] or A.obsm['x']. Strings are resolved by anndata.acc.AdAcc.resolve(), e.g. 'layers.counts'.

out LayerAcc | MultiAcc | str | bool (default: False)

Where to write the result, e.g. A.layers['k'] (or 'layers.k'). If True, the result is returned instead of written. If False, it is written to the place use reads from.

Return type:

AnnData | spmatrix | ndarray | None

Returns:

The transformed matrix if a matrix is passed or out=True, else None.