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

Oak NotImplementedError: interp2d has been removed in SciPy 1.14.0 #210

Closed
hackdna opened this issue Oct 30, 2023 · 1 comment · Fixed by #253
Closed

Oak NotImplementedError: interp2d has been removed in SciPy 1.14.0 #210

hackdna opened this issue Oct 30, 2023 · 1 comment · Fixed by #253
Assignees
Labels
technical debt Cruft and maintenance issues

Comments

@hackdna
Copy link
Member

hackdna commented Oct 30, 2023

To reproduce

pytest forest/oak/tests

Observed output

Current:

E       NotImplementedError: `interp2d` has been removed in SciPy 1.14.0.
E       
E       For legacy code, nearly bug-for-bug compatible replacements are
E       `RectBivariateSpline` on regular grids, and `bisplrep`/`bisplev` for
E       scattered 2D data.
E       
E       In new code, for regular grids use `RegularGridInterpolator` instead.
E       For scattered data, prefer `LinearNDInterpolator` or
E       `CloughTocher2DInterpolator`.
E       
E       For more details see
E       https://scipy.github.io/devdocs/tutorial/interpolate/interp_transition_guide.html

Original:

forest/oak/tests/test_identify_peaks_in_cwt.py::test_identify_peaks_in_cwt
  /Users/ils475/code/onnelalab/forest/forest/oak/base.py:177: DeprecationWarning: `interp2d` is deprecated!
  `interp2d` is deprecated in SciPy 1.10 and will be removed in SciPy 1.12.0.
  
  For legacy code, nearly bug-for-bug compatible replacements are
  `RectBivariateSpline` on regular grids, and `bisplrep`/`bisplev` for
  scattered 2D data.
  
  In new code, for regular grids use `RegularGridInterpolator` instead.
  For scattered data, prefer `LinearNDInterpolator` or
  `CloughTocher2DInterpolator`.
  
  For more details see
  `https://gist.github.com/ev-br/8544371b40f414b7eaf3fe6217209bff`
  
    ip = interpolate.interp2d(range(coefs.shape[1]), freqs, coefs)

Expected output

no errors or warnings

Reference

https://scipy.github.io/devdocs/tutorial/interpolate/interp_transition_guide.html

@hackdna hackdna added the technical debt Cruft and maintenance issues label Oct 30, 2023
@hackdna
Copy link
Member Author

hackdna commented Oct 23, 2024

@MStraczkiewicz and @GeorgeEfstathiadis This is causing the test suite to fail now. Could you have a look and provide a fix?
https://github.com/onnela-lab/forest/actions/runs/11486693855/job/31969543176

@hackdna hackdna changed the title Oak DeprecationWarning:interp2d is deprecated Oak NotImplementedError: interp2d has been removed in SciPy 1.14.0 Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Cruft and maintenance issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants