anndict.utils.populate_sparse_array

anndict.utils.populate_sparse_array#

anndict.utils.populate_sparse_array(df, genes, step_size)[source]#

Populates a sparse array with gene counts.

Parameters:
df DataFrame

The data containing ‘global_x’, ‘global_y’, and ‘gene’ columns.

genes array

The unique genes.

step_size int

The step size.

Return type:

csr_matrix

Returns:

The sparse matrix with gene counts.