set_num_threads#

SingleCell.set_num_threads(num_threads, /)[source]#

Return a new SingleCell dataset with a different default number of threads. Also sets the number of threads for the SingleCell dataset’s count matrix, if present.

Parameters:

num_threads: int

the new default number of threads. Set num_threads=-1 to use all available cores, as determined by os.cpu_count().

Returns:

A new SingleCell dataset with sc.num_threads and sc.X.num_threads set to num_threads.

Return type:

SingleCell