Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cjm-parallel-utils-0.0.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

cjm_parallel_utils-0.0.1-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page