- bar for serial case
This commit is contained in:
@@ -475,7 +475,7 @@ def pmap(fun, iterable=None, args=None, kwargs=None, length=None, desc=None, bar
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if length and length<serial: #serial case
|
if length and length<serial: #serial case
|
||||||
return [fun(c, *args, **kwargs) for c in iterable]
|
return [fun(c, *args, **kwargs) for c in tqdm(iterable, total=length, desc=desc, disable=not bar)]
|
||||||
else: #parallel case
|
else: #parallel case
|
||||||
with tqdmm(total=0, desc='Task buffer', disable=not qbar, leave=False) as qbar,\
|
with tqdmm(total=0, desc='Task buffer', disable=not qbar, leave=False) as qbar,\
|
||||||
tqdm(total=length, desc=desc, disable=not bar) as bar:
|
tqdm(total=length, desc=desc, disable=not bar) as bar:
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="parfor",
|
name="parfor",
|
||||||
version="2021.1.5",
|
version="2021.2.0",
|
||||||
author="Wim Pomp",
|
author="Wim Pomp",
|
||||||
author_email="wimpomp@gmail.com",
|
author_email="wimpomp@gmail.com",
|
||||||
description="A package to mimic the use of parfor as done in Matlab.",
|
description="A package to mimic the use of parfor as done in Matlab.",
|
||||||
|
|||||||
Reference in New Issue
Block a user