Utility functions for parallel operations.
Project description
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]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cjm_parallel_utils-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d81a7f15c37a08addf0d251b4116dfe4b9d8af0b3a3c00c641a207ac796c9ec |
|
MD5 | c278095a7d5d9d9d0a2dea65ae1b3784 |
|
BLAKE2b-256 | c8aee4585df2d62287d3a2f81cb2bbdf750d39d3272cf8abd1ec1cc768a00786 |