Skip to content

Commit

Permalink
Manage the deprecation/removal of scipy.integrate.cumtrapz
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodsf committed Jul 3, 2024
1 parent db76727 commit ea7c366
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sourcespec/ssp_build_spectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
import logging
import math
import numpy as np
from scipy.integrate import cumtrapz
# cumtrapz was deprecated in scipy 1.12.0 and removed in 1.14.0
try:
from scipy.integrate import cumtrapz
except ImportError:
from scipy.integrate import cumulative_trapezoid as cumtrapz
from scipy.interpolate import interp1d
from obspy.core import Stream
from sourcespec.spectrum import Spectrum, SpectrumStream
Expand Down

0 comments on commit ea7c366

Please sign in to comment.