The test_sampling.py relied on numbers found from the buggy InvCDF sampling before the fix in #19 . This updates the test with new numbers and replaces a hand-crafted truncated gaussian distribution in the test with an implementation from scipy, which directly gives the cdf values we want to test against.
In order to better ensure that things are working correctly, adding is also added to the InvCDF function. This ensures that the values at the edges - CDF values of 0 and 1 - return the right thing. Before, the edges were a little bit dodgy and could return values outside of [0,1].
The test_sampling.py relied on numbers found from the buggy InvCDF sampling before the fix in #19 . This updates the test with new numbers and replaces a hand-crafted truncated gaussian distribution in the test with an implementation from scipy, which directly gives the cdf values we want to test against.
In order to better ensure that things are working correctly, adding is also added to the InvCDF function. This ensures that the values at the edges - CDF values of 0 and 1 - return the right thing. Before, the edges were a little bit dodgy and could return values outside of [0,1].