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

Bugfix for method_params #19

Merged
merged 1 commit into from
May 8, 2024
Merged

Conversation

flowerthrower
Copy link
Contributor

If a user specifies their own method_params for an optimizer, they are set correctly as the optimizer's attributes.
However, because of an elif mistake, the parameter was added to the unused_params dictionary even if they were used!
This leads to an error where we can have the same argument passed multiple times to spopt.minimize through the method_options argument.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8998248632

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 69.557%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/qutip_qtrl/optimizer.py 0 1 0.0%
Totals Coverage Status
Change from base Build 8976358348: 0.0%
Covered Lines: 3313
Relevant Lines: 4763

💛 - Coveralls

@flowerthrower flowerthrower marked this pull request as ready for review May 8, 2024 08:01
Copy link
Member

@ajgpitch ajgpitch left a comment

Choose a reason for hiding this comment

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

Seems a simple and correct fix

@ajgpitch ajgpitch added the bug Something isn't working label May 8, 2024
@ajgpitch ajgpitch merged commit abf2034 into qutip:master May 8, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants