JuliaMath / Interpolations.jl

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

Documentation hard for me to understand #554

Open droodman opened 1 year ago

droodman commented 1 year ago

See https://discourse.julialang.org/t/updating-documentation-for-interpolations-jl-v0-14/84082/13?u=droodman

Thanks.

Sbozzolo commented 9 months ago

I would add this to the list: I came to Interpolations.jl because I have a vector (or grid) of x values, and a corresponding set of y values and I just want an interpolating function that I can evaluate on arbitrary inputs (within the domain of definition). In SciPy, this is documented here image This is clear and immediately applicable to any case.

On the other hand, the documentation of Interpolations.jl uses ranges everywhere. This adds lots of complexity and confusion. Even in the "Scaled BSplines" paragraph (which is where users are sent from the landing page when they have data not defined on a range), the documentation starts from and uses ranges. image It is left to the user to figure out how to use this with actual data.

mkitti commented 9 months ago

Part of the origin of this package was to provide highly optimized interpolation on regular grids, hence the emphasis on ranges. The comparable facility in SciPy would be https://docs.scipy.org/doc/scipy/tutorial/interpolate/ND_regular_grid.html

https://github.com/jipolanco/BSplineKit.jl and https://github.com/SciML/DataInterpolations.jl may make more sense for the general 1D cases.

Sbozzolo commented 9 months ago

Part of the origin of this package was to provide highly optimized interpolation on regular grids, hence the emphasis on ranges. The comparable facility in SciPy would be https://docs.scipy.org/doc/scipy/tutorial/interpolate/ND_regular_grid.html

https://github.com/jipolanco/BSplineKit.jl and https://github.com/SciML/DataInterpolations.jl may make more sense for the general 1D cases.

Thanks for your message. It is still difficult to understand what do with a vector that doesn't start from 1.

https://github.com/jipolanco/BSplineKit.jl and https://github.com/SciML/DataInterpolations.jl may make more sense for the general 1D cases.

I also need 3D nearest-neighbor (and linear) interpolations. All my grids are regular (but they don't start from 1).

I eventually found the code that works, but I also found the documentation really hard to follow.