- gmap bugfix

This commit is contained in:
Wim Pomp
2024-10-21 10:25:17 +02:00
parent d6afbc3caf
commit 396a1a791d
2 changed files with 5 additions and 3 deletions

View File

@@ -208,8 +208,10 @@ def gmap(fun: Callable[[Iteration, Any, ...], Result], iterable: Iterable[Iterat
def chunk_fun(iterable: Iterable, *args: Any, **kwargs: Any) -> list[Result]: # noqa
return [fun(iteration, *args, **kwargs) for iteration in iterable]
args = args or ()
kwargs = kwargs or {}
if args is None:
args = ()
if kwargs is None:
kwargs = {}
if 'total' not in bar_kwargs:
bar_kwargs['total'] = sum(iterable.lengths)

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "parfor"
version = "2024.10.1"
version = "2024.10.2"
description = "A package to mimic the use of parfor as done in Matlab."
authors = ["Wim Pomp <wimpomp@gmail.com>"]
license = "GPLv3"