JuliaMath / JuliaMath/Interpolations.jl

Weight computation for scaled interpolation

Open
#479 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
575
Forks
117
PR merge metrics
No merged PRs in 30d

Description

Hello,

I am working with Interpolations.jl and I am using the weight computation feature. However, the results are not what I was expecting. This code works fine if the interpolation is not scaled but it is not correct due to the scale step. Is it possible to calculate the weight for a scaled interpolation? Or does the weight calculation interface works differently than this with a scaled interpolation?

```
using Interpolations
x_X = range(0, 100., length = 10)
y = 1:length(x_X)
itp = interpolate(y, BSpline(Linear()))
itp_scaled = scale(itp, (x_X))

wis = Interpolations.weightedindexes((Interpolations.value_weights,), Interpolations.itpinfo(itp_scale)..., (2.5,))
y[wis[1]] # 2.5

itp_scaled(2.5) # 1.225
```

Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.