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

Pyspectral 0.13.1 not compatible with SciPy 1.14.x -> update dependencies #227

Closed
arcanerr opened this issue Jun 27, 2024 · 0 comments · Fixed by #228
Closed

Pyspectral 0.13.1 not compatible with SciPy 1.14.x -> update dependencies #227

arcanerr opened this issue Jun 27, 2024 · 0 comments · Fixed by #228

Comments

@arcanerr
Copy link

Code Sample, a minimal, complete, and verifiable piece of code

Sorry for not being more verbose, I'm short on time.

AttributeError: module 'scipy.integrate' has no attribute 'trapz'
...
File "/usr/local/lib/python3.11/site-packages/pyspectral/radiance_tb_conversion.py", line 224, in tb2radiance
    radiance = integrate.trapz(planck, self.wavelength_or_wavenumber) / self.rsr_integral
               ^^^^^^^^^^^^^^^

Problem description

Deprecated method scipy.integrate.trapz removed in SciPy 1.14.0, see scipy/scipy#20486 leads to above exception.

Solution suggestions

  • Bugfix version of pyspectral with requirement.txt containing
    scipy>=0.14, < 1.14 (or so)
  • and/of next major version using scipy.intergrate.trapezoid
  • check scipy.integrate attributes whether trapz or trapezoid is available
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