Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cumulative_trapezoid instead of cumtrapz #40

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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