scviva.tools.vision.pool_matrix#
- scviva.tools.vision.pool_matrix(X, pools, obs_names)[source]#
Average expression within each micro-cluster via sparse matrix multiply.
Mirrors R VISION’s
poolMatrixCols_Inner. Builds a binaryn_cells × n_poolsindicator matrix and multiplies it against the expression matrix in a single sparse operation, then divides each row by its pool size.- Parameters:
- Return type:
- Returns:
ndarray of shape (n_pools, n_genes) Per-pool mean expression.