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

Replace interp2d with RegularGridInterpolator #253

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

hackdna
Copy link
Member

@hackdna hackdna commented Oct 23, 2024

Fix #210

@hackdna hackdna added the technical debt Cruft and maintenance issues label Oct 23, 2024
@GeorgeEfstathiadis
Copy link
Collaborator

@hackdna I was actually working on another fix following this guide https://docs.scipy.org/doc/scipy/tutorial/interpolate/interp_transition_guide.html

  # reorder coefficients so that freqs are in ascending order
  order = np.argsort(freqs)
  coefs = coefs[order, :]
  freqs = freqs[order]

  # interpolate coefficients
  ip = interpolate.RectBivariateSpline(range(coefs.shape[1]), freqs, coefs.T, kx = 1, ky = 1)
  coefs_interp = ip(range(coefs.shape[1]), freqs_interp).T

The 2 versions output close enough values (tolerance 1e-10), so we can go with this approach fine

@GeorgeEfstathiadis GeorgeEfstathiadis merged commit 7c9f83c into develop Oct 25, 2024
4 checks passed
@GeorgeEfstathiadis GeorgeEfstathiadis deleted the remove-interp2d branch October 25, 2024 17:49
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 this pull request may close these issues.

Oak NotImplementedError: interp2d has been removed in SciPy 1.14.0
2 participants