跳转到主要内容

Python的multiprocessing的包装器,提供对tqdm进度条和共享参数的支持

项目描述

Python的multiprocessing的包装器,提供对tqdm进度条和共享参数的支持。

提供简单、熟悉的接口,并具有额外功能。

安装

pip install enhanced_multiprocessing

示例用法

from enhanced_multiprocessing import Pool

def add_n(x, n):
    return x + n

# the number of processes will be set to number of cores - 1 by default
p = Pool()

# will apply add_n to the element list of length three with n=5, showing a nice progress bar along
result = p.imap(add_n, [1, 2, 3], shared_args=(5, ))

assert list(result) == [6, 7, 8]

历史

最初发布在kn-bibs/pathways-analysis,后来为krassowski/drug-disease-profile-matching进一步开发。

项目详情


下载文件

下载适合您平台的应用程序。如果您不确定要选择哪一个,请了解有关安装软件包的更多信息。

源代码分发

enhanced_multiprocessing-1.0.tar.gz (4.0 kB 查看哈希值)

上传于 来源

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面