tocsr#
- SingleCell.tocsr(*, num_threads=None)[source]#
Make a copy of this SingleCell dataset, converting X to a csr_array. Raise an error if X is already a csr_array.
- Parameters:
num_threads: int | None
the number of threads to use when converting to CSR. Set num_threads=-1 to use all available cores, as determined by
os.cpu_count(). By default (num_threads=None), use self.num_threads cores. Does not affect the returned SingleCell dataset’s num_threads; this will always be the same as the original dataset’s num_threads.- Returns:
A copy of this SingleCell dataset, with X as a csr_array.
- Return type: