mfouesneau / pyphot

suite to deal with passband photometry
https://mfouesneau.github.io/pyphot/
MIT License
56 stars 18 forks source link

pyphot calls a function that was removed by the latest version of scipy #55

Open stefanarseneau opened 4 weeks ago

stefanarseneau commented 4 weeks ago

In a couple different files, pyphot calls the function scipy.integate.trapz, which was renamed to scipy.integrate.trapezoid and removed in scipy version 1.14.0. I think I've solved this issue, and will submit a pull request. Thanks for the great software!

Specifically, this causes importing pyphot to fail:

>>> import pyphot
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/arsen/miniconda3/envs/core-composition/lib/python3.12/site-packages/pyphot/__init__.py", line 1, in <module>
    from .phot import (Library, Ascii_Library, HDF_Library, Filter)
  File "/home/arsen/miniconda3/envs/core-composition/lib/python3.12/site-packages/pyphot/phot.py", line 20, in <module>
    from scipy.integrate import trapz
ImportError: cannot import name 'trapz' from 'scipy.integrate' (/home/arsen/miniconda3/envs/core-composition/lib/python3.12/site-packages/scipy/integrate/__init__.py)
mfouesneau commented 4 weeks ago

Thanks. Yes I just read numpy 2.0 removed it.