Skip to content

Commit

Permalink
Merge pull request #40 from ericpre/cumtrapz
Browse files Browse the repository at this point in the history
Use `cumulative_trapezoid` instead of  `cumtrapz`
  • Loading branch information
jlaehne authored Apr 9, 2024
2 parents 6412ba7 + 77b0dfa commit 89810e3
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 89810e3

Please sign in to comment.