-
Notifications
You must be signed in to change notification settings - Fork 6
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
adding check on num_samples #455
Conversation
Please let me know if there's a reason not to this using an |
@sabinala , as discussed in our call yesterday, could you please change these assertions to the following:
|
Changing assert statement to if (condition) raise ValueError
@djinnome I've changed the |
Can you also add a unit test that gives a nonpositive interger and a float and a tensor int to num_samples and assert that a ValueError is raised? |
@djinnome unit tests for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fabulous, @sabinala !
This PR adds an assert statement (see code below) in both
sample
andensemble_sample
that will give the error message: "num_samples must be a positive integer." ifnum_samples
is not a positive integer.Closes #451