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

SciPy deprecation warning for scipy.integrate.cumtrapz #436

Closed
vsnever opened this issue May 13, 2024 · 1 comment · Fixed by #437
Closed

SciPy deprecation warning for scipy.integrate.cumtrapz #436

vsnever opened this issue May 13, 2024 · 1 comment · Fixed by #437
Assignees

Comments

@vsnever
Copy link
Member

vsnever commented May 13, 2024

When calculating with the Beam, SciPy 1.12 raises DeprecationWarning:

DeprecationWarning: 'scipy.integrate.cumtrapz' is deprecated in favour of 'scipy.integrate.cumulative_trapezoid' and will be removed in SciPy 1.14.0

Therefore, we need to replace deprecated cumtrapz() with the cumulative_trapezoid() in SingeRayAttenuator._beam_attenuation(). However, the new name was only introduced in SciPy 1.7, and the tests fail in the Python 3.7 + oldest-supported-numpy environment.

I suggest using:

try:
    from scipy.integrate import cumulative_trapezoid
except ImportError:
    from scipy.integrate import cumtrapz as cumulative_trapezoid
@vsnever vsnever self-assigned this May 13, 2024
@vsnever vsnever linked a pull request May 13, 2024 that will close this issue
@vsnever
Copy link
Member Author

vsnever commented May 17, 2024

Fixed in #437.

@vsnever vsnever closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant