core.multiprocessing.apply_func_with_multiprocessing
core.multiprocessing.apply_func_with_multiprocessing(
func,
theta,
num_processes=1,
)Call func(theta.iloc[idx].to_dict()) with multiprocessing.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| func | callable | required | |
| theta | pd.DataFrame | Parameters with multiple rows, evaluate func for each row. | required |
| num_processes | int | Number of parallel processes to use. | 1 |
Returns
| Name | Type | Description |
|---|---|---|
| result | np.ndarray | Output array, where result[idx] = func(theta.iloc[idx].to_dict()) |