diff --git a/LoopStructural/modelling/features/_geological_feature.py b/LoopStructural/modelling/features/_geological_feature.py index 2e7890be..ca45e1fa 100644 --- a/LoopStructural/modelling/features/_geological_feature.py +++ b/LoopStructural/modelling/features/_geological_feature.py @@ -158,7 +158,8 @@ def evaluate_gradient(self, pos: np.ndarray, ignore_regions=False) -> np.ndarray ) points_faulted = self._apply_faults(points) values = self.interpolator.evaluate_value(points_faulted) - return self.interpolator.support.evaluate_gradient(pos, values) + v[mask, :] = self.interpolator.support.evaluate_gradient(pos[mask, :], values) + return v pos = self._apply_faults(pos) if mask.dtype not in [int, bool]: logger.error(f"Unable to evaluate gradient for {self.name}")