Last updated:
0 purchases
cjmparallelutils 0.0.1
cjm-parallel-utils
Install
pip install cjm_parallel_utils
How to use
parallel
from cjm_parallel_utils.core import parallel
from functools import partial
test_array = list(range(10))
print(test_array)
def test_func(index, array):
array[index]*=2
partial_func = partial(test_func, array=test_array)
parallel(partial_func, arr=range(len(test_array)), leave=True);
print(test_array)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
0%| | 0/10 [00:00<?, ?it/s]
[0, 2, 4, 6, 8, 10, 12, 14, 16, 18]
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.