From e629be00eddb6f0f43eab2f62a8738d18491c140 Mon Sep 17 00:00:00 2001 From: stefanhiemer Date: Wed, 3 Jul 2024 13:48:09 +0200 Subject: [PATCH] Replaced scipy.integrate.cumtrapz by the new scipy.integrate.cumulative_trapezoid in a backwards compatible way. Integrators.py however needs some cleanup in my opinion as several packages are imported, that do not seem to do anything. --- calphy/integrators.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/calphy/integrators.py b/calphy/integrators.py index 61d25ca..e89751e 100644 --- a/calphy/integrators.py +++ b/calphy/integrators.py @@ -28,7 +28,10 @@ import os import warnings from calphy.splines import splines, sum_spline1, sum_spline25, sum_spline50, sum_spline75, sum_spline100 -from scipy.integrate import cumtrapz +try: + from scipy.integrate import cumtrapz +except ImportError: + from scipy.integrate import cumulative_trapezoid as cumtrapz from tqdm import tqdm import pyscal3.core as pc from ase.io import read