Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interpolate() does not interpolate #223

Open
julianbrost opened this issue Aug 15, 2017 · 0 comments
Open

interpolate() does not interpolate #223

julianbrost opened this issue Aug 15, 2017 · 0 comments

Comments

@julianbrost
Copy link

The interpolate function does not work as expected: The yellow dots represent a series x and the green dots interpolate(x):
interpolate

The problem is that the code at

lastIndex = i - consecutiveNones - 1
lastValue = series[lastIndex]
for index in range(i - consecutiveNones, i):
nextValue = lastValue + (index - lastIndex)
nextValue = nextValue * (value - lastValue)
nextValue = nextValue / (consecutiveNones + 1)
series[index] = nextValue
does not do the same as the code from where it was copied https://github.com/graphite-project/graphite-web/blob/36ec37729ca9c4de58127f2177c33a572806666b/webapp/graphite/render/functions.py#L523-L524. When replacing these lines with the ones from graphite-web, it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant