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 segment ratio function #164

Merged

Conversation

j-c-cook
Copy link
Contributor

@j-c-cook j-c-cook commented Nov 8, 2021

The limit 0 < end_length_ratio < 0.5 should apply to all cases.

Also, in preparation for #153, we could consider here to allow nSegments=2 and nSegments=1 (which would simply return segment_ratios=numpy.array([0.5, 0.5]) and numpy.array([1.0])). A warning will be required in these cases to warn the user that the end_length_ratio parameter is overwritten.

closes #159

@j-c-cook
Copy link
Contributor Author

j-c-cook commented Nov 8, 2021

Ready for your review @MassimoCimmino.

- Corrected typos.
- Removed warning for nSegments=1, since segment_ratios = [1.] is the only
  valid value in this case.
- Added some comments.
- Clarified the warning for factor < 1 to better inform the user on how to
  resolve the issue.
@MassimoCimmino MassimoCimmino merged commit 806ade9 into MassimoCimmino:master Nov 9, 2021
@MassimoCimmino
Copy link
Owner

Merged, thank you @j-c-cook.

@j-c-cook j-c-cook deleted the issue_159_FixSegmentRatios branch April 8, 2022 00:00
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.

End length ratio 0 < alpha < 0.5
2 participants