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

Fixed bug in simulations w.r.t. default params. #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DuncDennis
Copy link

Fixed a bug in the simulation classes, where the default parameter is wrongly used if the parameter is set to 0.


The previous parameter assignment in the __init__ of the simulation classes is done by:

self.<param> = <param> or self.default_parameters["<param>"]

This leads to wrong behavior if you want to set the <param> to 0, as in these cases, the default parameter is used.

In this pull-request the parameter is changed to the following to get the correct behavior:

self.<param> = <param> if <param> is not None else self.default_parameters["<param>"]

Fixed a bug in the simulation classes, where the default parameter is used if the given parameter is 0.
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