netmap.masking.internal.create_pairwise_binary_mask¶ netmap.masking.internal.create_pairwise_binary_mask(binary_matrix, gene_list, ordered_pair_list)[source]¶ Creates a dense 2D array of pairwise masks using preallocation. Parameters: binary_matrix (np.ndarray) – Rows=cells, Cols=genes. gene_list (list) – The names of the genes in binary_matrix columns. ordered_pair_list (list) – The specific order of “GeneA_GeneB” strings requested for the final output columns. Returns: A 2D array of shape (num_cells, len(ordered_pair_list)). Return type: np.ndarray