LHS test cases and minor changes related to samples attribute
Description
A script "test_LHS.py" is added in the "tests\SampleMethods" directory. It contains 16 test cases that provide 100% line coverage on the LHS class. Also, changes related to "nsamples" attribute have been made.
Motivation and Context
While initiating an LHS object, the code checks, if "nsamples" is an integer or not. The code raise an error, if it is not an integer. So after that line if-else statement, checking if self.nsamples is None, will never be satisfied. Thus, I have removed such conditions and introduced a check on "nsamples" attribute, inside the "run" method.
Types of changes
What types of changes does your code introduce? Put an x in all the boxes that apply:
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
Go over all the following points, and put an x in all the boxes that apply.
If you're unsure about any of these, don't hesitate to ask. We're here to help!
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
LHS test cases and minor changes related to samples attribute
Description
A script "test_LHS.py" is added in the "tests\SampleMethods" directory. It contains 16 test cases that provide 100% line coverage on the LHS class. Also, changes related to "nsamples" attribute have been made.
Motivation and Context
While initiating an LHS object, the code checks, if "nsamples" is an integer or not. The code raise an error, if it is not an integer. So after that line if-else statement, checking if self.nsamples is None, will never be satisfied. Thus, I have removed such conditions and introduced a check on "nsamples" attribute, inside the "run" method.
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Checklist:
Go over all the following points, and put an
x
in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!