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

Fix bad allocation of slopes #1320

Merged
merged 1 commit into from
Jul 4, 2019

Conversation

jeanlaroche
Copy link
Contributor

No description provided.

@@ -206,7 +207,7 @@ void do_interp(const T1 &dz, const T2 &dx, const T3 &dy, T4 &dres,

/* only pre-calculate slopes if there are relatively few of them. */
if (lenxp <= lenx) {
auto slope_vect = std::vector<double>(lenxp - 1);
slope_vect = std::vector<npy_double>(lenxp - 1);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you probably just want a resize(lenxp -1) here

@jeanlaroche
Copy link
Contributor Author

Done, done and done!

@serge-sans-paille serge-sans-paille merged commit 4f9b6a6 into serge-sans-paille:master Jul 4, 2019
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

Successfully merging this pull request may close these issues.

2 participants