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

Handle special case of fitting a line #325

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Handle special case of fitting a line #325

merged 1 commit into from
Nov 27, 2023

Conversation

raphlinus
Copy link
Contributor

When the algorithm is asked to curve-fit a line, area and moment are both zero, which provokes numerical instablily. Just return a straight line in that case.

When the algorithm is asked to curve-fit a line, area and moment are both zero, which provokes numerical instablily. Just return a straight line in that case.
Copy link
Collaborator

@derekdreery derekdreery left a comment

Choose a reason for hiding this comment

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

I've been using this method in production for a while (check for straight line) and it seems to solve the problem. 🙂

@derekdreery
Copy link
Collaborator

Hi would you mind if I merged this and cut a release?

@raphlinus raphlinus merged commit 10b4855 into main Nov 27, 2023
14 checks passed
@raphlinus raphlinus deleted the offset_line branch November 27, 2023 12:57
@raphlinus
Copy link
Contributor Author

Feel free to do a release, sure.

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