tacco.utils.parallel_nnls

parallel_nnls(A, B, n_jobs=None, batch_size=50)[source]

Runs multiple nnls in parallel.

Parameters:
  • A – A 2d ndarray.

  • B – A 2d ndarray or a scipy sparse matrix with the second dimension identical to the first dimension of as A.

  • n_jobs – How many jobs/cores should be run on. If None, runs on all available cores.

  • batch_size – The number of problems to assign to a job/core per batch.

Returns:

A ndarray containing the results.