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

restore best-fit parameter values for high accuracy values of constrained values #907

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

newville
Copy link
Member

Description

This makes sure that the best-fit (or current) values are restored to their original values in Parameters.create_uvars.

As shown in #905, values for constraint expressions may be off slightly (around uncertainty or machine precision) without this fix.

Type of Changes
  • Bug fix
  • New feature
  • Refactoring / maintenance
  • Documentation / examples
Tested on

Python: 3.10.10 | packaged by conda-forge | (main, Mar 24 2023, 20:17:34) [Clang 14.0.6 ]

lmfit: 1.2.2.post0+g8b2038a.d20230727, scipy: 1.11.1, numpy: 1.25.1, asteval: 0.9.31, uncertainties: 3.1.7

Verification

Have you

  • included docstrings that follow PEP 257?
  • referenced existing Issue and/or provided relevant link to mailing list?
  • verified that existing tests pass locally?
  • verified that the documentation builds locally?
  • squashed/minimized your commits and written descriptive commit messages?
  • added or updated existing tests to cover the changes?
  • updated the documentation and/or added an entry to the release notes (doc/whatsnew.rst)?
  • added an example?

@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #907 (2a70f77) into master (8b2038a) will increase coverage by 0.62%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #907      +/-   ##
==========================================
+ Coverage   92.60%   93.23%   +0.62%     
==========================================
  Files          10       10              
  Lines        3693     3696       +3     
==========================================
+ Hits         3420     3446      +26     
+ Misses        273      250      -23     
Files Changed Coverage Δ
lmfit/parameter.py 98.48% <100.00%> (+<0.01%) ⬆️

... and 4 files with indirect coverage changes

@newville
Copy link
Member Author

I think this is uncontroversial, so I'll just merge it.

@newville newville merged commit fc3f7f8 into master Jul 28, 2023
@newville newville deleted the restore_vals_create_uvars branch August 23, 2023 02:32
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.

1 participant