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
File details
Details for the file cjm-parallel-utils-0.0.1.tar.gz
.
File metadata
- Download URL: cjm-parallel-utils-0.0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bda403a5f16ad3e2cce240ee589da27b34c1f2d58e3dfa85c0416c0c1b28cbc7 |
|
MD5 | f1a13da1bfdc596b64522c246159b423 |
|
BLAKE2b-256 | 35424debb43387efd0cff3df461e107f9116002f419cbec68fcb6bf13c88123c |
File details
Details for the file cjm_parallel_utils-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: cjm_parallel_utils-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d81a7f15c37a08addf0d251b4116dfe4b9d8af0b3a3c00c641a207ac796c9ec |
|
MD5 | c278095a7d5d9d9d0a2dea65ae1b3784 |
|
BLAKE2b-256 | c8aee4585df2d62287d3a2f81cb2bbdf750d39d3272cf8abd1ec1cc768a00786 |