Closed sabinala closed 8 months ago
Please let me know if there's a reason not to this using an assert
statement. We had discussed writing a test for this, but I think this is sufficient and simpler.
@sabinala , as discussed in our call yesterday, could you please change these assertions to the following:
if condition:
raise ValueError("description")
@djinnome I've changed the assert
statement to an if
statement that raises a ValueError
, and now this PR is ready for review.
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 sample
and ensemble_sample
error messages are now in their own files inside of tests
and all tests are passing!
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