Skip to content

Commit

Permalink
Use cumulative_trapezoid instead of deprecated cumtrapz - the lat…
Browse files Browse the repository at this point in the history
…er has been renamed to the former
  • Loading branch information
ericpre committed Apr 9, 2024
1 parent 6412ba7 commit 77b0dfa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exspy/signals/dielectric_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 77b0dfa

Please sign in to comment.