From a9e7f9cb196260214f186aeb15905bf87cebd69d Mon Sep 17 00:00:00 2001 From: AnihilatorGun Date: Mon, 25 Nov 2024 02:25:27 +0300 Subject: [PATCH 1/2] faster combiner --- dpipe/im/grid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpipe/im/grid.py b/dpipe/im/grid.py index 0e06f31..f52e682 100644 --- a/dpipe/im/grid.py +++ b/dpipe/im/grid.py @@ -142,7 +142,7 @@ def build(self): result_torch = torch.from_numpy(self._result) counts_torch = torch.from_numpy(self._counts) - counts_torch[counts_torch == 0] = 1 + counts_torch.clip_(1) torch.div(result_torch, counts_torch, out=result_torch) else: np.true_divide(self._result, self._counts, out=self._result, where=self._counts > 0) From 6e8e13ddb2c30bc699c60d85f873395c2f9c869d Mon Sep 17 00:00:00 2001 From: AnihilatorGun Date: Mon, 25 Nov 2024 02:27:16 +0300 Subject: [PATCH 2/2] version --- dpipe/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpipe/__version__.py b/dpipe/__version__.py index a987347..908c0bb 100644 --- a/dpipe/__version__.py +++ b/dpipe/__version__.py @@ -1 +1 @@ -__version__ = '0.4.2' +__version__ = '0.4.3'