JuliaMath / Interpolations.jl

Fast, continuous interpolation of discrete datasets in Julia
http://juliamath.github.io/Interpolations.jl/
Other
523 stars 110 forks source link

Are `linear_interpolation` and `cubic_spline_interpolation` really correct function names? #540

Open zxm403089989 opened 1 year ago

zxm403089989 commented 1 year ago

I followed exactly the same example in document http://juliamath.github.io/Interpolations.jl/stable/convenience-construction/#Usage. However, Julia said that linear_interpolation and cubic_spline_interpolation are not defined:

using Interpolations

help?> linear_interpolation
search:

Couldn't find linear_interpolation
Perhaps you meant LinearInterpolation or ConstantInterpolation
  No documentation found.

  Binding linear_interpolation does not exist.

help?> cubic_spline_interpolation
search:

Couldn't find cubic_spline_interpolation
Perhaps you meant CubicSplineInterpolation
  No documentation found.

  Binding cubic_spline_interpolation does not exist.

I am wandering that are those information in document true? We can see that function LinearInterpolation and CubicSplineInterpolation are well defined. I suppose these are just typos or there are something need to be updated?

mkitti commented 1 year ago

What version of Interpolations.jl are you using?

julia> using Interpolations

help?> linear_interpolation
search: linear_interpolation

  etp = linear_interpolation(knots, A; extrapolation_bc=Throw())

  A shorthand for one of the
  following.

    •  extrapolate(scale(interpolate(A,
       BSpline(Linear())),
       knots),
       extrapolation_bc)

    •  extrapolate(interpolate(knots,
       A,
       Gridded(Linear())),
       extrapolation_bc),

  depending on whether knots are
  ranges or vectors.

  Consider using interpolate,
  scale, or extrapolate
  explicitly as needed rather
  than using this convenience
  constructor. Performance will
  improve without scaling or
  extrapolation.

julia> using Pkg

julia> pkg"status Interpolations"
Status `/tmp/jl_1imjMf/Project.toml`
  [a98d9a8b] Interpolations v0.14.7
zxm403089989 commented 1 year ago

Thanks for your response. I understand what happened now. I am using version v0.13.6 and Pkg prevent me updating due to package consistency and I thought I already using all latest version packages.