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

Update scipy integration methods in filters.py #90

Closed

Conversation

michaelbuehlmann
Copy link

Newer versions of Scipy have renamed the trapz and simps integration routines to trapezoid and simpson respectively. Currently, importing speclite.filter fails with those versions of scipy. Also see the SciPy issue.

This PR will check which variant of those methods is available.

@michaelbuehlmann
Copy link
Author

I just noticed the other PR – I should have amended that one, I apologize. However, this PR should work with any scipy version

@moustakas
Copy link
Member

Thanks for this contribution @michaelbuehlmann.

@sbailey I'm good with merging this because it maintains backwards compatibility (and I also need it with the more recent version of scipy I'm using on my laptop).

I haven't really dug into the test failures but I think those should be fixed separately.

@michaelbuehlmann
Copy link
Author

Seems like the current errors are all similar to this:

AttributeError: module 'numpy.typing' has no attribute 'NDArray'. 

which is used in PIL.Image. NDArray is only available in numpy >= 1.21, but the CI script runs

python -m pip install 'numpy<1.21'

@weaverba137
Copy link
Member

Thank you again @michaelbuehlmann! This PR is now superseded by #91

@weaverba137 weaverba137 closed this Aug 2, 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 this pull request may close these issues.

3 participants