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' 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)