Fix Out-of-bouds panic in find_roots_eigen - #24
Merged
Conversation
Owner
|
Merge conflict. Additionally, the previous commit 3d053a1 may already solve this issue. |
Contributor
Author
|
Indeed, the issue is solved. This PR just adds a test case, and I kept the replacement of some Vecs with slices/iterators. You may keep it if you want. |
Also reduced allocations needed to use find_roots_eigen.
Contributor
Author
|
Actually I was wrong in my previous comment: the issue is still there. I didn't notice the parameters' order change. After updating my test the panic is still there. So the last commits haven't solved the issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using
find_roots_eigenin one of my projects I found a case when it panics with out-of-bound error.Now, I'm not sure if the proposed fix is valid, but it seems to work in my project.
Additionally, I've removed the necessity of allocating new Vec in two places, but I haven't energy for trying to do it in the entire code.