JuliaMath / Interpolations.jl

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

Documentation typo #519

Closed Shmuley95 closed 1 year ago

Shmuley95 commented 1 year ago

https://juliamath.github.io/Interpolations.jl/latest/control/#Monotonic-interpolation

Maybe I don't understand the documentation, but in the example on monotonic interpolation, in the third line the data and the grid seem to be reversed. That is: itp_cdf = extrapolate(interpolate(y, percentile_values, SteffenMonotonicInterpolation()), Flat()); should probably be itp_cdf = extrapolate(interpolate(percentile_values, y, SteffenMonotonicInterpolation()), Flat());

mkitti commented 1 year ago

The documentation looks correct to me. We're trying to estimate the cumulative distribution function.

image

Shmuley95 commented 1 year ago

Ah yes, I got a bit confused by the grid over which is interpolated (the x-axis) being named "y" and being described in the comment as "data". My bad!