diff --git a/disba/_sensitivity.py b/disba/_sensitivity.py index 919548c..b2a72ee 100644 --- a/disba/_sensitivity.py +++ b/disba/_sensitivity.py @@ -92,7 +92,7 @@ def __call__(self, t, mode=0, wave="rayleigh", parameter="velocity_s"): ) return SensitivityKernel( - self._thickness.cumsum() - self._thickness[0], + numpy.insert(self._thickness.cumsum()[:-1], 0, 0.0), kernel, t, c1, @@ -184,7 +184,7 @@ def __call__(self, t, mode=0, wave="rayleigh", parameter="velocity_s"): ) return SensitivityKernel( - self._thickness.cumsum() - self._thickness[0], + numpy.insert(self._thickness.cumsum()[:-1], 0, 0.0), kernel, t, c1, @@ -274,7 +274,7 @@ def __call__(self, t, mode=0, parameter="velocity_s"): par[i] *= fac return SensitivityKernel( - self._thickness.cumsum() - self._thickness[0], + numpy.insert(self._thickness.cumsum()[:-1], 0, 0.0), kernel, t, None,