Interpolate - deprecate getindex

Hi,

I am interpolating two vectors and then evaluating the function at some other point. For example,

f = interpolate(a,b, Gridded(Linear()))

c = f[zz[1]]

where zz[1] is the first element of a vector.

I get this error about the line ’ c = f[zz[1]] ’

┌ Warning: getindex(itp::AbstractInterpolation{T, N}, i::Vararg{Number, N}) where {T, N} is deprecated, use itp(i...) instead.

What does it exactly mean? I don’t know what’s the suggestion about.

Thank you.

It’s telling you to change from f[zz[1]] to f(zz[1]), since the interpolant f is better thought of as a function, not an array.

3 Likes