@@ -207,24 +207,24 @@ For a quick check that things are working you can try the following:
207
207
import pymc as pm
208
208
from pymc.distributions.distribution import get_moment
209
209
210
- # pm.blah = pm.Uniform in this example
211
- blah = pm.Blah .dist([ 0 , 0 ], [ 1 , 2 ] )
210
+ # pm.blah = pm.Normal in this example
211
+ blah = pm.Normal .dist(mu = 0 , sigma = 1 )
212
212
213
213
# Test that the returned blah_op is still working fine
214
214
blah.eval()
215
- # array([0.62778803, 1.95165513] )
215
+ # array(-1.01397228 )
216
216
217
- # Test the get_moment
217
+ # Test the get_moment method
218
218
get_moment(blah).eval()
219
- # array([0.5, 1. ] )
219
+ # array(0. )
220
220
221
- # Test the logp
222
- pm.logp(blah, [1 .5 , 1.5 ]).eval()
223
- # array([ -inf , -0.69314718 ])
221
+ # Test the logp method
222
+ pm.logp(blah, [- 0 .5 , 1.5 ]).eval()
223
+ # array([-1.04393853 , -2.04393853 ])
224
224
225
- # Test the logcdf
226
- pm.logcdf(blah, [1 .5 , 1.5 ]).eval()
227
- # array([ 0. , -0.28768207 ])
225
+ # Test the logcdf method
226
+ pm.logcdf(blah, [- 0 .5 , 1.5 ]).eval()
227
+ # array([-1.17591177 , -0.06914345 ])
228
228
```
229
229
230
230
## 3. Adding tests for the new ` RandomVariable `
0 commit comments