API Documentation


pyParz

pyParz.parallelize.foreach(toPar, parFunc, args=None, numThreads=1)[source]

Main pyParz function.

Parameters:
  • toPar (list or ndarray) – The list of things to be parallelized.
  • parFunc (function) – The function that each element of toPar is passed to.
  • args (list) – The list of arguments to be passed to each iteration.
  • numTreads (int) – The number of cores you want to use.
Returns:

results – The list of results in arbitrary order

Return type:

list

pyParz.parallelize.parReturn(toReturn)[source]

Optional return function.

Parameters:toReturn (list or ndarray or dict) – Item to return
Returns:Returns pickleable elements.
Return type:final