From 77b0dfa352356615065a25636bb7925143a0d0e4 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Tue, 9 Apr 2024 09:25:04 +0100 Subject: [PATCH] Use `cumulative_trapezoid` instead of deprecated `cumtrapz` - the later has been renamed to the former --- exspy/signals/dielectric_function.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exspy/signals/dielectric_function.py b/exspy/signals/dielectric_function.py index 0997aeb68..01199dda2 100644 --- a/exspy/signals/dielectric_function.py +++ b/exspy/signals/dielectric_function.py @@ -18,7 +18,7 @@ import numpy as np from scipy import constants -from scipy.integrate import simpson, cumtrapz +from scipy.integrate import simpson, cumulative_trapezoid from hyperspy._signals.complex_signal1d import ( ComplexSignal1D, @@ -95,7 +95,7 @@ def get_number_of_effective_electrons(self, nat, cumulative=False): else: neff1 = self._deepcopy_with_new_data( k - * cumtrapz( + * cumulative_trapezoid( (-1.0 / self.data).imag * axis.axis, x=axis.axis, axis=axis.index_in_array, @@ -104,7 +104,7 @@ def get_number_of_effective_electrons(self, nat, cumulative=False): ) neff2 = self._deepcopy_with_new_data( k - * cumtrapz( + * cumulative_trapezoid( self.data.imag * axis.axis, x=axis.axis, axis=axis.index_in_array,