Permalink
Browse files

Added unit test for Weibull RNG and expected value

  • Loading branch information...
fonnesbeck committed Aug 8, 2012
1 parent 837f636 commit 83b00190da701c6b283e0049325e5a5e9119744e
Showing with 5 additions and 0 deletions.
  1. +5 −0 pymc/tests/test_distributions.py
@@ -984,6 +984,11 @@ def test_calling(self):
b = flib.weibull([1,2], [2,2], [3,3])
assert_equal(a,b)
+ def test_random(self):
+ parameters = {'alpha': 2., 'beta': 3.}
+ r = rweibull(parameters['alpha'], parameters['beta'], size=100)
+ assert_almost_equal(r.mean(), weibull_expval(**parameters), 1)
+
#-------------------------------------------------------------------------------
# Test Wishart / Inverse Wishart distributions
_Tau_test = np.matrix([[ 209.47883244, 10.88057915, 13.80581557],

0 comments on commit 83b0019

Please sign in to comment.