Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

alexhroom
Copy link
Collaborator

@alexhroom alexhroom commented Aug 16, 2024

This PR changes the Control parameter nMCMC to an int. It is currently a float greater than or equal to zero, but if you set it to a non-integer value then the process hangs (because it is supposed to be an integer). It is a float in the C++ code, and pybind11 automatically converts the integer to a float when the C++ Controls object is made: to test this you can try

from RATapi.inputs import make_input
_, _, _, _, cpp_controls = make_input(problem, RAT.Controls(procedure="ns"))
print(cpp_controls.nMCMC)

and see that it prints 0.0.

Also fixes ruff linting as the latest ruff update made it lint jupyter notebooks by default.

@alexhroom alexhroom requested a review from DrPaulSharp August 16, 2024 09:48
@alexhroom alexhroom changed the title Changes control parameter nMCMC to int Changes control parameter nMCMC to int & fixes failing ruff lint Aug 16, 2024
@alexhroom alexhroom merged commit 8707f61 into RascalSoftware:main Aug 16, 2024
7 checks passed
@alexhroom alexhroom deleted the make-nmcmc-int branch August 16, 2024 10:22
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