pub(crate) fn set_num_threads(n: usize) -> PyResult<()>
Set the number of threads in the global rayon thread pool.
Must be called before any parallel operation. Passing 0 uses rayon’s default (number of CPU cores).