Skip to content

Deprecation of scipy.interpolate.interp2d #270

Description

@mlincett

From current unit testing output:

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`.

Here are the occurrences:

flarestack/core/llh.py:        f = scipy.interpolate.interp2d(dec_bins, gamma_bins, acc.T, kind="linear")
flarestack/icecube_utils/reference_sensitivity.py:    sens_ref = interp2d(np.array(sindecs), np.array(gammas), np.log(sens.T))
flarestack/icecube_utils/reference_sensitivity.py:    disc_ref = interp2d(np.array(sindecs), np.array(gammas), np.log(disc.T))
flarestack/icecube_utils/reference_sensitivity.py:    sens_ref = interp2d(np.array(sindecs), np.array(gammas), np.log(sens.T))
flarestack/icecube_utils/reference_sensitivity.py:    sens_ref = interp2d(np.array(sindecs), np.array(gammas), np.log(sens.T))
flarestack/utils/percentile_SoB.py:    spline = scipy.interpolate.interp2d(x, y, np.log(ratio))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwarning

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions