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

add check of f0 sum, norm if >1 #45 #46

Merged
merged 2 commits into from
May 29, 2024
Merged

add check of f0 sum, norm if >1 #45 #46

merged 2 commits into from
May 29, 2024

Conversation

sschmidt23
Copy link
Collaborator

Problem & Solution Description (including issue #)

Addresses the problem in issue #45 where the fractions f0 can sum to more than 1, which will force the last type to go negative at the m0 value and nearby values. I added an if statement and division to set to 1.0 if >1, which fixes the issue in tests that I ran. I'm not adding a unit test because the nelder-mead minimizer is fickle and it's sometimes hard to trigger, plus I have tested it in notebooks and it works as expected.

Code Quality

  • My code follows the code style of this project
  • I have written unit tests or justified all instances of #pragma: no cover; in the case of a bugfix, a new test that breaks as a result of the bug has been added
  • My code contains relevant comments and necessary documentation for future maintainers; the change is reflected in applicable demos/tutorials (with output cleared!) and added/updated docstrings use the NumPy docstring format
  • Any breaking changes, described above, are accompanied by backwards compatibility and deprecation warnings

@sschmidt23 sschmidt23 requested a review from eacharles May 29, 2024 01:53
@sschmidt23 sschmidt23 merged commit e04ee91 into main May 29, 2024
5 checks passed
@sschmidt23 sschmidt23 deleted the issue/45/normbug branch May 29, 2024 01:59
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