From 0fa88254f8e29bb6775da73e5094233f54cdab4c Mon Sep 17 00:00:00 2001 From: David Bold Date: Wed, 9 Oct 2024 09:37:14 +0200 Subject: [PATCH] Update for new scipy --- zoidberg/rzline.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zoidberg/rzline.py b/zoidberg/rzline.py index 6a6a1f1..f01bdba 100644 --- a/zoidberg/rzline.py +++ b/zoidberg/rzline.py @@ -8,7 +8,13 @@ import numpy as np from numpy import append, argmin, cos, linspace, pi, sin, sqrt -from scipy.integrate import cumtrapz + +try: + # New scipy changed the name + from scipy.integrate import cumulative_trapezoid as cumtrapz +except ImportError: + from scipy.integrate import cumtrapz + from scipy.interpolate import interp1d, splev, splrep try: